You cannot use just any 'keyword' in the IF statement. See the JCL Referece manual for relation-expression keywords for the IF statement.
z/OS 1.11 library is here:
http://publib.boulder.ibm.com/infocenter/zos/v1r11/index.jsp

The example that works use valid return code values (0-4095) and therefore is seen as a value rather a symbol (I think).

Birger Heede
IBM DK



Dibitu wrote:
Why this is OK
//SETV SET VERSION=8
//STEPNULL EXEC PGM=IEFBR14
//SYSPRINT DD  SYSOUT=*
//IF1 IF STEPNULL.RC= 0 AND &VERSION=7 THEN
//VERSION7 EXEC PGM=IEFBR14
//SYSPRINT DD  SYSOUT=*
//ENDIF1 ENDIF
//IF1 IF STEPNULL.RC= 0 AND &VERSION=8 THEN
//VERSION8 EXEC PGM=IEFBR14
//SYSPRINT DD  SYSOUT=*
//ENDIF1 ENDIF
//IF1 IF STEPNULL.RC= 0 AND &VERSION=9 THEN
//VERSION9 EXEC PGM=IEFBR14
//SYSPRINT DD  SYSOUT=*
//ENDIF1 ENDIF

and this is JCL ERROR ?

//SETV SET VERSION=B
//STEPNULL EXEC PGM=IEFBR14
//SYSPRINT DD  SYSOUT=*
//IF1 IF STEPNULL.RC= 0 AND &VERSION=A THEN
//VERSIONA EXEC PGM=IEFBR14
//SYSPRINT DD  SYSOUT=*
//ENDIF1 ENDIF
//IF1 IF STEPNULL.RC= 0 AND &VERSION=B THEN
//VERSIONB EXEC PGM=IEFBR14
//SYSPRINT DD  SYSOUT=*
//ENDIF1 ENDIF
//IF1 IF STEPNULL.RC= 0 AND &VERSION=C THEN
//VERSIONC EXEC PGM=IEFBR14
//SYSPRINT DD  SYSOUT=*
//ENDIF1 ENDIF

STMT NO. MESSAGE
       5 IEFC013I ERROR IN IF STATEMENT: B NOT VALID
       9 IEFC013I ERROR IN IF STATEMENT: B NOT VALID
      13 IEFC013I ERROR IN IF STATEMENT: B NOT
VALID

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to