Single ampersand is correct for temporary dataset names. With the advent of symbolic parameters circq OS/360 R14, double ampersand became valid as a symbol that expanded to a single ampersand.
\\foo PROC bar=baz ... \\SYSUT1 DD DSN=&&&bar should request the temporary &baz. I'd be interested to see if that actually works. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List <IBM-MAIN@listserv.ua.edu> on behalf of Tom Brennan <t...@tombrennansoftware.com> Sent: Saturday, June 9, 2018 5:25 PM To: IBM-MAIN@listserv.ua.edu Subject: Re: Use of dynamic system symbols in JCL And I'm one of the perpetrators! For a long time I thought the single asterisk was proper and whenever I saw the double I assumed it was a mistake that just happened to work. Tom Conley wrote: > On 6/9/2018 2:24 PM, Ed Jaffe wrote: > >> On 6/6/2018 8:51 AM, Steve Smith wrote: >> >>> This has been previously discussed. The main issue (as usual) is >>> incompatibility with an ancient bug (or feature). Specifically, >>> temporary >>> dataset names such as DSN=&TMP. That's supposed to be DSN=&&TMP, but >>> for >>> whatever reason, the single-& version works, unless &TMP is a symbol. >> >> >> Wow! I confirmed this is an exposure! I never knew! >> >> IBM does not mention the single ampersand being valid temporary data >> set name syntax in the description of the DSNAME parameter on the DD >> statement and I have previously not seen it used that way. >> https://secure-web.cisco.com/17SostiwRF4glBwCbQGN00grlR4ZOVHRcF4WVEacpIKb5xpeZmW91ak-fwttTKazaMniGXJ-IXbDupio6X8Nx94ypSi9sOeZVkacHTyBQHA2cA4UpVSxGby7BZF852syZg-h34iZQ9y_4I1Pb6LBYktA73idbRjCjVjU7TU85rUBE2mFzNVg_VRN3y8KMDuOcIpvWtd4ggTzTNEnqw7K6nC6VeSMOgaZ6ukq4PIQ0U4M_25EQ2sauzAnBaRlBeDPpD9_ZFZOenKK2YL7ADvuCzGxfOu_g20LqMi3l-Nm5XXEZIQ22ugCUPP5Wism7Z0jSHAIj4VTKqEvC9S-6eEMmg9KMldgxuM2KYW_7W7meV8y-pnSUjza6HY9-bpM53UZL_iVNqgmBW6wLgYxyCw9V303VSJgG7UsgYNsa1daV0b6ssG99i3py_XcAjA-fNZqS/https%3A%2F%2Fwww.ibm.com%2Fsupport%2Fknowledgecenter%2Fen%2FSSLTBW_2.3.0%2Fcom.ibm.zos.v2r3.ieab600%2Fiea3b6_Syntax25.htm >> >> >> This reminds me of the rule in REXX where use of an uninitialized >> variable results in the variable name itself being substituted. But, >> that is documented behavior. This is just plain wrong. >> >> It might be a good use of the common tracker component (GTZ) to help >> identify JCL with such errors. Otherwise, every new symbol added -- to >> the system, to a proc, to anything that might have visibility to a job >> stream -- can lead to unexpected JCL errors. >> > > That's not a bug, that's a FEATURE! > > ---------------------------------------------------------------------- > 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 ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN