Previous Topic: Example 1Next Topic: Syntax


IF, AND, OR

Use the IF keyword to identify situations where subsequent actions or processing is to be taken. IF is different from SELRECIF and SELMEMIF in that IF defines a condition that requires further processing, whereas with SELRECIF and SELMEMIF, once a record or PDS member is selected, that record or member is acted on by the command.

The AND/OR keywords are only valid immediately following the IF keyword, as well as the SKIPRECIF, SELRECIF and SELMEMIF keywords.

When an IF keyword immediately follows another IF/AND/OR keyword, the second IF is treated like an AND statement.

When IFs are separated by actions, subsequent IFs are not subordinate to the previous IF. The last action and the STOP keyword are subordinate to an IF/AND/OR ends the IF/AND/ORs actions.