I wrote these before learning about BPXWDYN, and I'm used to them now. To tell
you the truth, I STILL haven't learned about BPXWDYN, not really; I don't do
much with Unix, just enough to log on, create a user's home directory, check
ownership bits and the like.
I don't know what TOCTTOU is.
Yes, it requires TSO. Well, wait, I run it in TSO/ISPF; I imagine it'll work
in batch as well but I have no idea about other environments.
The RC and reason codes used:
/* Is it a DSN? */
fds:
call listdsi dx
sysreason=sysreason+0
if result=16 & wordpos(sysreason,'1 5 25')=0,
then say 'DSDD: FDS' dx result sysreason
return result<16 | sysreason=25
/* Get LISTDSI. Warning: LISTDSI returns RC=16, sysreason=2 both if
DD is missing and if it's allocated to a GDG(+1)! */
fdd:
call listdsi dx 'FILE'
sysreason=sysreason+0
if result=16 & wordpos(sysreason,'1 2 3 27 28')=0,
then say 'DSDD: FDD' dx result sysreason
return result<16 | wordpos(sysreason,'3 27')>0
---
Bob Bridges, [email protected], cell 336 382-7313
/* We must picture Hell as a state where everyone is perpetually concerned
about his own dignity and advancement, where everyone has a grievance, and
where everyone lives the deadly serious passions of envy, self-importance, and
resentment. -C S Lewis, preface to _The Screwtape Letters_ */
-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of
Paul Gilmartin
Sent: Wednesday, August 21, 2024 22:32
--- On Wed, 21 Aug 2024 21:04:34 -0400, Bob Bridges wrote:
>I have two external REXX execs that I use frequently (depending on which one
>you need):
>
>TEMPDD returns a DD name that is guaranteed not to be currently in use; it's
>up to the caller to allocate it. I can specify a prefix; for example, if I
>call TEMPDD with arg "XYZ" then it might return "XYZ12345" or "XYZ01".
>
Does this have any advantage over BPXWDYN, which uses DYNALLOC to not only
select a guaranteed unique DD name but also to perform the allocation?
Does this have a TOCTTOU hazard?
Does this require TSO?
>DSDD takes a string argument and returns a two-bit reply indicating whether
>the string indicates an catalogued DSN and/or a currently allocated DDN. If I
>call DSDD with arg "XYZ", and it returns '01', then there's no DSN by that
>name but my TSO session is currently using that DDN.
>
Is technical support available?
Why not use a standard facility such as BPXWDYN rather than RYO?
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN