Summary -
In this topic, we described about the below sections -
The conditions used in IF statements are basically three types.
- Sign
- Relation
- Complex
IF Sign condition -
IF SIGN condition is used to verify the sign of a particular data item. There are three types sign validation.
- POSITIVE
- NEGITIVE
- ZERO
Sign condition type syntax -
IF Identifier/data-name IS [NOT] {POSITIVE/NEGATIVE/ZERO}
IF Sign condition - Practical Example:
Code -

Jcl -

Output -

IF Relation condition -
IF Relation condition is used to verify the relation between two identifiers/literals. The below are the IF relational conditions
- GREATER THAN
- LESS THAN
- EQUAL
- NOT
Relation condition type syntax -
IF {Identifier/Literal} IS [NOT] {GREATER THAN/ >/ LESS THAN/ =/ LESS THAN OR EQUAL TO/ <=} {Identifier/Literal}
IF Relation condition - Practical Example:
Code -

Jcl -

Output -

IF Complex condition -
IF complex condition is used to verify the one or more sign or relational types. Complex condition is the combination of conditions by using AND/OR operators .The below are the IF complex conditions
- AND
- OR
Complex condition type syntax -
IF Condition {AND/OR} Condition
IF Complex condition - Practical Example -
Code -

Jcl -

Output -
