Suppose in Rexx I do:
call BPXWDYN 'alloc rtddn(DD1) dummy'
... /* do stuff */
call subr
... /* do more stuff */
call BPXWDYN 'free DD('DD1')'
return( RC )
Subr:
call BPXWDYN 'alloc rtddn(DD2) dummy'
... /* do other stuff */
call BPXWDYN 'free DD('DD2')' /* Clean up like a good camper. */
return( RC )
... It seems that in the second call to BPXWDYN, DYNALLOC returns the
same DDNAME for DD2 that it did for DD1. So the "free" usurps the
DDNAME in use by the caller. Is this WAD? BAD? APARable?
I suppose I could use BPXWDYN 'info ...' before the second call; determine
whether the returned DD2 was previously allocated, and bypass the 'free'.
This strikes me as onerous.
Why does DYNALLOC do that?
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN