ELSE
The ELSE parameter enables you to code actions to perform when the preceding conditional statement is false. This parameter is valid with the USER or TALLY functions and COPYALL, DUMPALL, FPRINTALL, LISTALL, PRINTALL, UPDATEALL, and VPRINTALL.
The syntax of the ELSE parameter is:
ELSE
Guidelines:
- The ELSE parameter must be subordinate to an IF parameter.
When using the ELSE parameter with the TALLY, COPYALL, DUMPALL, FPRINTALL, LISTALL, PRINTALL, UPDATEALL, or VPRINTALL function, the ELSE must directly follow and precede one or more action parameters.
Valid Example:$$DD01 COPYALL IF=(1,0,C'ABC'),
REPL=(1,C'DEF'),
ELSE,
REPL=(1,C'XYZ')Invalid Example:
$$DD01 COPYALL IF=(1,0,C'ABC'),
REPL=(1,C'DEF'),
ELSE,
IF=(1,0,C'DEF') (not an action)
- The ELSE parameter may not immediately precede the DFLT_WRITE parameter.
- When using the ELSE parameter with the USER function, it must directly follow and precede an action parameter (ACCUM,EDIT, MOVE, READNEXT, or REPL).
For Example:
$$DD01 USER IF=(1,0,C'ABC'),
WRITE=FILE1,
ELSE,
WRITE=FILE2
WRITE=FILE1,
ELSE,
WRITE=FILE2
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*