*DO, Par, IVAL, FVAL, INC
Defines the beginning of a do-loop.
ParThe name of the scalar parameter to be used as the loop index.
See *SET for name restrictions. Any existing parameter
of the same name will be redefined. There is no character parameter substitution
for the Par field.
IVAL, FVAL, INCInitially assign IVAL to Par.
Increment IVAL by INC for
each successive loop. If IVAL exceeds FVAL and INC is
positive, the loop is not executed. INC defaults
to 1. Negative increments and non-integer numbers are allowed.
The block of commands following the *DO command (up
to the *ENDDO command) is executed repeatedly until some
loop control is satisfied. Printout is automatically suppressed on all loops
after the first (include a /GOPR command to restore the
printout). The command line loop control (Par,IVAL,FVAL,INC) must be input; however, a Use the *IF within
the block can also be used to control looping [*EXIT, *CYCLE].
One level of internal file switching is used for each nested *DO.
Twenty levels of nested do-loops are allowed.
Note: Do-loops that include /INPUT, *USE, or an "Unknown Command" macro, have less nesting available because each of these operations also uses a level of file switching. The *DO, *ENDDO, and any *CYCLE and *EXIT commands for a do-loop must all be read from the same file (or keyboard). You cannot use the MULTIPRO or *CREATE commands within a *DO-loop. Picking operations should also not be used within a *DO-loop.
This command is valid in any processor.