This worked on my employer's V2.2 system: // EXPORT SYMLIST=* // SET S=MAR // SET YYYY=2018 //* //GEN EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //SYSUT2 DD SYSOUT=* //SYSUT1 DD *,SYMBOLS=JCLONLY &S. &YYYY. //*
SYSUT2 output via SDSF Browse in a TN3270 50x160 session (watch for wrap): SDSF BROWSE TDPEFARZ (JOB09122) SYSUT2 Line 00000001 Col 001 160 Command ===> Scroll ===> CSR ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2----+----3----+----4----+----5----+----6 MAR 2018 ************************************************************************ Bottom of Data ************************************************************************ Peter -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Nims,Alva John (Al) Sent: Monday, March 26, 2018 2:19 PM To: IBM-MAIN@LISTSERV.UA.EDU 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) ajn...@ufl.edu (p) (352) 273-1298 -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Paul Gilmartin Sent: Monday, March 26, 2018 2:10 PM To: IBM-MAIN@LISTSERV.UA.EDU 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! -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN