According to the JCL manual that won't work: The following keywords are the only keywords supported by IBM and recommended for use in relational-expressions. Any other keywords, even if accepted by the system, are not intended or supported keywords. Also you need to change DNS to DSN....
Keyword Use RC indicates a return code ABEND indicates an abend condition occurred ¬ABEND indicates no abend condition occurred ABENDCC indicates a system or user completion code RUN indicates that the specified step started execution ¬RUN indicates that the specified step did not start execution You will have to get more creative. Perhaps pass a parm that causes an abend in a first step? //ABC PROC VER='X14' This will run first step //STEP1 EXEC PGM=IEFBR&VER //IF620 IF (ABEND) THEN //PGMNAME EXEC PGM=IEFBR14 //DD1 DD DSN=somefile,DISP=SHR // ELSE //PGMNAME EXEC PGM=IEFBR14 //DD2 DD DSN=somefile,DISP=SHR // ENDIF // PEND //TEST EXEC ABC //ABC PROC VER='X14' This will run second step //STEP1 EXEC PGM=IEFBR&VER //IF620 IF (ABEND) THEN //PGMNAME EXEC PGM=IEFBR14 //DD1 DD DSN=somefile,DISP=SHR // ELSE //PGMNAME EXEC PGM=IEFBR14 //DD2 DD DSN=somefile,DISP=SHR // ENDIF // PEND //TEST EXEC ABC -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Victor Zhang Sent: Wednesday, April 18, 2012 9:02 AM To: IBM-MAIN@bama.ua.edu Subject: Re: Execute certian steps based on input parm Ok, the proc is like: //ABC PROC VER='620' //PGMNAME EXEC PGM=PGM //STEPLIB DD DNS=LOADMOD.V620 IF VER NOT = '620' i want proc be: //PGMNAME EXEC PGM=PGM //STEPLIB DD DNS=LOADMOD.V710 So I code: //ABC PROC VER='620' //IF620 IF (&VER=620) THEN //PGMNAME EXEC PGM=PGM //STEPLIB DD DNS=LOADMOD.V620 // ELSE //PGMNAME EXEC PGM=PGM //STEPLIB DD DNS=LOADMOD.V710 // ENDIF But it does not work. Please help. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN This e-mail may contain confidential or privileged information. If you think you have received this e-mail in error, please advise the sender by reply e-mail and then delete this e-mail immediately. Thank you. Aetna ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN