z/OS MVS JCL Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Example 2

z/OS MVS JCL Reference
SA23-1385-00

The following example shows a simple IF/THEN/ELSE/ENDIF statement construct without an ELSE statement.
//JOBA      JOB   ...
//STEP1     EXEC  PGM=RTN
             .
             .
//IFBAD     IF  (ABEND | STEP1.RC > 8) THEN
//TRUE      EXEC  PROC=ERROR
//IFBADEND  ENDIF
//NEXTSTEP  EXEC  PROC=CONTINUE

The IF statement named IFBAD invokes procedure ERROR if either an abend has occurred on a previous step of the job, or STEP1 has returned a return code that is greater than 8. Otherwise, step TRUE is bypassed and the system processes step NEXTSTEP.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014