I have a requirement to execute a particular step based on the value provided in symbolic parameter
We have assigned value for the symbolic parm PRODTEST as mentioned below
//XXXXXXXX JOB (x,xxx,xxxx),CLASS=A,MSGCLASS=T,REGION=0M,NOTIFY=&SYSUID
// SET PRODTEST=T ----> symbolic parm
// SET PRODTEST=T ----> symbolic parm
Based on the parm value mentioned above (it can be either as T or P), we are supposed to execute one or the other JCL step like mentioned below.
But i m getting JCL error like this. Please help me resolve this error
STMT NO. MESSAGE
47 IEFC013I ERROR IN IF STATEMENT: T NOT VALID
54 IEFC013I ERROR IN IF STATEMENT: T NOT VALID
// IF (&PRODTEST = 'P') THEN
//SUBMIT1 EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=XXXXX.XXX.DONTUIM.JCLS(PRODUIM)
//SYSUT2 DD SYSOUT=(B,INTRDR)
//SYSPRINT DD DUMMY
//SYSIN DD DUMMY
// ENDIF
// IF (&PRODTEST = 'T') THEN
//SUBMIT2 EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=XXXXX.XXX.DONTUIM.JCLS(TESTUIM)
//SYSUT2 DD SYSOUT=(B,INTRDR)
//SYSPRINT DD DUMMY
//SYSIN DD DUMMY
// ENDIF
//SUBMIT1 EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=XXXXX.XXX.DONTUIM.JCLS(PRODUIM)
//SYSUT2 DD SYSOUT=(B,INTRDR)
//SYSPRINT DD DUMMY
//SYSIN DD DUMMY
// ENDIF
// IF (&PRODTEST = 'T') THEN
//SUBMIT2 EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=XXXXX.XXX.DONTUIM.JCLS(TESTUIM)
//SYSUT2 DD SYSOUT=(B,INTRDR)
//SYSPRINT DD DUMMY
//SYSIN DD DUMMY
// ENDIF
This is how JCL substitution is happening in JESJCL
47 // IF (&PRODTEST = P) THEN
IEFC653I SUBSTITUTION JCL - (T = P)
48 //SUBMIT1 EXEC PGM=IEBGENER
49 //SYSUT1 DD DISP=SHR,DSN=XXXXXX.XXXX.DONTUIM.JCLS(PRODUIM)
50 //SYSUT2 DD SYSOUT=(B,INTRDR)
51 //SYSPRINT DD DUMMY
52 //SYSIN DD DUMMY
53 // ENDIF
54 // IF (&PRODTEST = T) THEN
IEFC653I SUBSTITUTION JCL - (T = T)
55 //SUBMIT2 EXEC PGM=IEBGENER
IEFC653I SUBSTITUTION JCL - (T = P)
48 //SUBMIT1 EXEC PGM=IEBGENER
49 //SYSUT1 DD DISP=SHR,DSN=XXXXXX.XXXX.DONTUIM.JCLS(PRODUIM)
50 //SYSUT2 DD SYSOUT=(B,INTRDR)
51 //SYSPRINT DD DUMMY
52 //SYSIN DD DUMMY
53 // ENDIF
54 // IF (&PRODTEST = T) THEN
IEFC653I SUBSTITUTION JCL - (T = T)
55 //SUBMIT2 EXEC PGM=IEBGENER