That has been true for as long as I can remember. Why? You said that you
wanted DD with certain characteristics. SVC 99, in an attempt to be
efficient, will use an existing allocation where ever possible. There is
not any kind of count associated with a DD which contains "number of times
allocated". So FREE would only fail if the DD were actually OPEN, since
there is a scan for that somewhere in there. If you want a UNIQUE DD name,
then you'd need to specify it yourself. I don't know, but I would guess
that the SVC 99 parameter list in BPXWDYN does not set flag S99NOCNV in the
S99FLG11 field.
ref:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/a3208582/75.1.1
<quote>
2 (2) CHARACTER 1 S99FLG11 FIRST FLAGS BYTE
1... .... S99ONCNV "X'80'" ALLOC
FUNCTION-DO NOT USE
AN EXISTING
ALLOCATION THAT DOES
NOT HAVE THE
CONVERTIBLE ATTRIBUTE
TO SATISFY A REQUEST
.1.. .... S99NOCNV "X'40'" ALLOC
FUNCTION-DO NOT USE
AN EXISTING
ALLOCATION TO SATISFY
THE REQUEST
</quote>
On Mon, Sep 16, 2013 at 4:34 PM, Paul Gilmartin <[email protected]>wrote:
> 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
>
--
As of next week, passwords will be entered in Morse code.
Maranatha! <><
John McKown
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN