Block DO
A block DO
runs a block of code
once, and has no arguments.
For example:
DO
VARSET COLLECT = “Y”
DISPLAY “COLLECT” !COLLECT
END
You can use it together with
IF-THEN-ELSE
to run more than one command,
when the expression is true, as in the following
example:IF “!TAG” = “-JOBNAME”
THEN DOVARSET COLLECT = “Y”
DISPLAY “COLLECT” !COLLECT
END
ELSE DO
VARSET COLLECT = “N”
END