Well, if you specify // SET &TEMP=HLQ.DSN //SYSUT2 DD DSN=&TEMP then you get DSN=HLQ.DSN, or comment out the SET for DSN=&TEMP.
Avoid quotes as they can result in uncataloged DSNs with invalid characters. On Wed, Jul 5, 2023 at 4:13 PM Paul Gilmartin <0000042bfe9c879d-dmarc-requ...@listserv.ua.edu> wrote: > > On Wed, 5 Jul 2023 20:49:48 +0000, Sri h Kolusu wrote: > > >>> Is that true? My understanding has been that a single ampersand > >>> identifies a temporary data set name, and the additional ampersand is > >>> used to prevent symbol substitution. > > > >Page 168 in the JCL reference > >htt:s://www-40.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R5sa231385?OpenDocument > > > >In general, the system treats a single ampersand (&) followed by a character > >string of 1 to 8 characters as a symbolic parameter. (See “Using system > >symbols and JCL symbols” on page 35.) However, if you code a data set name > >as a symbolic parameter (by coding DSNAME=&xxxxxxxx), and do not assign a > >value to or nullify the symbolic parameter, the system will process it as a > >temporary data set name. > > > Are they making a special case out of something that isn't a special case? > > In particular, how can I code setting JCL symbol that might evaluate either > to: > o A catalogued DSN: // SEt D='HLQ.DSN' > o A temp DSN: // SET D='&TEMP' > ... > //SYSUT2 DD DSN=&D > > -- > gil > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- Mike A Schwab, Springfield IL USA Where do Forest Rangers go to get away from it all? ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN