Hi Lizette I tried even a 2 stage attempt, hoping to fool it!
2 // SET B=' ' 3 // SET A=&B'UNIT=SYSDA' IEFC653I SUBSTITUTION JCL - A= 4 //STEP1 EXEC PGM=IEFBR14 5 //SETDD DD DISP=SHR,DSN=MY.DSN&A IEFC653I SUBSTITUTION JCL - DISP=SHR,DSN=MY.DSN Same, see, not even &A gets resolved. A second attempt after changes... 2 // SET D='DISP=SHR ' 3 // SET U='UNIT=SYSDA' 4 //STEP1 EXEC PGM=IEFBR14 5 //SETDD DD DSN=MY.DSN,&D&U IEFC653I SUBSTITUTION JCL - DSN=MY.DSN,DISP=SHR /S 😱 ________________________________ From: IBM Mainframe Discussion List <[email protected]> on behalf of Lizette Koehler <[email protected]> Sent: 26 March 2018 18:46 To: [email protected] Subject: Re: In-Stream Symbols and The Length Just a side note I opened a PMR last year on the use of Set A=',UNIT=SYSDA' and SET A=' UNIT=SYSDA' In the first case, the substitution was correct In the second substitution - I was hoping to see a space followed by UNIT=SYSDA // DD DISP=SHR,DSN=MY.DSN&A The first case: // DD DISP=SHR,DSN=MY.DSN,UNIT=SYSDA The Second case: // DD DISP=SHR,DSN=MY.DSN Where I had hoped for // DD DISP=SHR,DSN=MY.DSN UNIT=SYSDA So somethings will not substitute well with spaces in them, and others will IEBCOPY - it carried everything into the control cards. JCL not so much I was told Work As Designed Lizette > -----Original Message----- > From: IBM Mainframe Discussion List <[email protected]> On Behalf Of > Nims,Alva John (Al) > Sent: Monday, March 26, 2018 11:19 AM > To: [email protected] > Subject: Re: In-Stream Symbols and The Length > > Thank you for the suggestions, but instead of trying to make it easy by > complicating things, I am just going to do: > //SHRTMN SET SHRTMN='SEP 2018' > //* > //LONGMN SET LONGMN='September 2018' > > The above works just fine for me. > > Al Nims > Systems Admin/Programmer III > UF Information Technology > East Campus > P.O. Box 112050 > Gainesville, FL. 32611 > (e) [email protected] > (p) (352) 273-1298 > > -----Original Message----- > From: IBM Mainframe Discussion List [mailto:[email protected]] On > Behalf Of Paul Gilmartin > Sent: Monday, March 26, 2018 2:10 PM > To: [email protected] > Subject: Re: In-Stream Symbols and The Length > > On Mon, 26 Mar 2018 17:35:45 +0000, Nims,Alva John (Al) wrote: > > >Not really. > >I have been using IEBGENER to create a simple way of testing. > > > >Here is what happened when I did the SET statement as you suggested. > > > >I inserted the following after adding M5NAME to the EXPORT list and there is > a black space between &M3NAME. and &YYYY.: > >//M5NAME SET M5NAME='&M3NAME. &YYYY.' > > The argument to SET is not documented as one of the few places in which > symbol substitution is performed between apostrophes. However, I have found > something like this works. I can find no documentation to support this: > > // SET Q='''' > // SET B=' ' > //M5NAME SET M5NAME=&Q.&M3NAME.&B.&YYYY.&Q > (I don't believe the dots are necessary.) > > The order of operations in parsing JCL is poorly documented. There should be > an RCF for this. > > There should be an RFE to support symbol substitution in a quoted argument to > SET. (But compatibility?) > > >In the JCL Output the above becomes: > >//M5NAME SET M5NAME='&M3NAME. &YYYY.' > >//M5NAME EXPORT EXPSET=&M3NAME. &YYYY. GENERATED STATEMENT > > ... > >I am sure that there is a simple little explanation buried somewhere, but I > have not found it. > >I also just realized that with another symbol, I am going to have a problem > with "September" and other long named months. > >I am going to have to do some additional testing. > > > I get a runtime I/O error when I do that sort of thing, even when I specify > an ample LRECL on the SYSUT1 DD. The coded LRECL appears to be effective > wnen attributes are merged at OPEN, but not when symbols are substituted. I > consider this an implementation defect which should be subject to APAR. > > I hate JCL! > > -- gil > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
