I think using the SVC 99 returned DD name is a "best practice" although if you 
can make up a guaranteed-unique DD name of your own it's hard to see what's 
wrong with that. If I had such code and it worked I would not touch it, but for 
new code I would be using the SVC 99 service.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Bob Bridges
Sent: Tuesday, March 31, 2020 2:36 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: PARM= vs PARMDD= and symbol substitution

In any REXX I write that has to know, I include this statement at the beginning:

  fbat=(sysvar('SYSENV')='BACK')

If SYSVAR('SYSENV') is "BACK", it's running in the background so I set the fbat 
flag.  Elsewhere in the program it checks FBAT:

  if fbat then 'look for a DD
  else 'use a predetermined DSN

Hm, no one ever told me choosing a random DD name is passé.  I have a TEMPDD 
routine that returns a DD name guaranteed to be unused; otherwise many of my 
routines would end up conflicting whenever I use them recursively (sort of).

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to