I was working on a Rexx EXEC which contained something like:
call BPXWDYN 'alloc rtddn(XYZZY) dummy'
/* ... do stuff ... */
call BPXWDYN 'free dd('XYZZY')'
I thought I was DTRT by freeing what I allocated. But I was startled
to observe in a trace that BPXWDYN (SVC 99, I suppose) didn't
generate a DDNAME, but returned the DDNAME of a DUMMY allocated
earlier (in fact by the TSO logon proc JCL).
So I suppose I shouldn't free a DDNAME someone else allocated.
But how can I tell? Is a practical ROT simply not to free anything
I allocated as DUMMY? Are other DDNAMEs or keywords at similar
risk? Which?
If SVC 99 is going to reuse DDNAMES, it ought to keep a reference
count and do nothing until the frees balance the allocates. This is
evidently not the case: later in the program, after the free, I
allocated another dummy and got a new generated DDNAME.
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN