Report it and see if you get a resolution of Broken As Designed (BAD).
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Windt, W.K.F. van der (Fred) [00000185ecbb3806-dmarc-requ...@listserv.ua.edu] Sent: Monday, March 30, 2020 7:50 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: PARM= vs PARMDD= and symbol substitution Based on the doc I expected these two JCL variations to behave 100% equivalent (assuming the program van handle any parameter length): //STEP1 EXEC PGM=program,PARM='parameter with symbols' And //STEP1 EXEC PGM=program,PARM=PARMDD //PARMDD DD *,SYMBOLS=JCLONLY parameter with symbols /* But unexpected stuff happens when you add SET statements between job steps. // SET VRB=VALUE1 //STEP1 EXEC PGM=program,PARM='&VRB' //* // SET VRB=VALUE2 //STEP2 EXEC PGM=program,PARM='&VRB' //* // SET VRB=VALUE3 //STEP3 EXEC PGM=program,PARM='&VRB' Behaves as expected. In STEP1 the program in invoked with parameter VALUE1, in STEP2 with parameter VALUE2 and in STEP3 with parameter VALUE3. If I change the JCL to this: // SET VRB=VALUE1 //STEP1 EXEC PGM=program,PARM=PARMDD //PARMDD DD *,SYMBOLS=JCLONLY &VRB /* //* // SET VRB=VALUE2 //STEP2 EXEC PGM=program,PARM=PARMDD //PARMDD DD *,SYMBOLS=JCLONLY &VRB /* //* // SET VRB=VALUE3 //STEP3 EXEC PGM=program,PARM=PARMDD //PARMDD DD *,SYMBOLS=JCLONLY &VRB /* Does not behave 'logical' at all. In STEP1 the program is invoked with parameter VALUE2, in STEP2 and STEP3 with parameter VALUE3. It seems SET statement that follow the current EXEC statement (but before the next EXEC statement) are processed before the PARMDD= parameter is constructed. I can't find any documentation that specifies this behavior. Is this a bug? Regardz, Fred! ----------------------------------------------------------------- ATTENTION: The information in this e-mail is confidential and only meant for the intended recipient. If you are not the intended recipient, don't use or disclose it in any way. Please let the sender know and delete the message immediately. ----------------------------------------------------------------- ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN