IF command (PL/I)
The IF command lets you conditionally perform
a command. You can optionally specify an ELSE clause
on the IF command. If the test expression evaluates
to false and an ELSE clause exists, the command associated
with the ELSE clause is performed. The keywords
cannot be abbreviated.
- expression
- A valid z/OS® Debugger PL/I
expression.
If necessary, the expression is converted to a
BITstring. - command
- A valid z/OS Debugger command.
When IF commands are nested and ELSE clauses
are present, a given ELSE is associated with the
closest preceding IF clause within the same block.
Usage notes
- An
ELSEclause should always be included if theIFclause causes z/OS Debugger to get more input (for example, anIFcontainingUSEor other commands that cause z/OS Debugger to be restarted because anAT-condition occurs). - The
ifcommand cannot be used while you replay recorded statements by using theLAYBACKcommands.
Examples
- If the value of
array1is equal to the value ofarray2, go to the statement with label constantlabel_1. Execution of the user program continues atlabel_1. Ifarray1does not equalarray2, theGOTOis not performed and control is passed to the user program.IF array1 = array2 THEN GOTO LABEL label_1; ELSE GO; - Set a breakpoint at statement 23, which will test if variable
jis equal to 10, display the names and values of variablesrmdr,totodd, andterms(j). If variablejis not equal to 10, continue program execution.AT 23 IF j = 10 THEN LIST TITLED (rmdr, totodd, terms(j)); ELSE GO;
