JCL IF Statement

JCL REFERBACK

Advertisements


IF statement used to construct the JOB in a conditional manner.

IF statement can have up to 15 levels internally.

IF statement validates the return code of the previous steps.

The previous step may not be the immediate preceding step of IF condition.

THEN is mandatory along with IF statement.

ELSE is optional with IF condition.

END-IF is mandatory along with IF condition.

Every IF condition coded in JCL should end with END-IF.


Syntax:

	 //[name] IF  [(]relational-expression[)] THEN   [comments]
	    .
	    .    Set of statements for condition true
	    .
	//[name] [ELSE   [comments]]
	    .
	    .    Set of statements for condition false
	    .
	//[name] ENDIF   [comments]
 

If any questions on the above, post your queries on Jcl Discussion forum


JCL REFERBACK

Advertisements