These days we are opting for BPXWDYN in our REXXs instead of TSO ALLOC.  One
of the main reason for the switch is BPXWDYN's ability to return the DDNAME
it allocated via the RTDDN parameter.

 

Chasing down a bug in my code lead me to discover an idiosyncrasy with
BPXWDYN that I think is a bug, but maybe not. So I'm seeking your opinions. 

 

If I have the following

 

 

Call bpxwdyn "Alloc rtddn(dd) da('any.dataset.name') shr reuse"

Say 'DDname allocated is 'dd

Call bpxwdyn "Free fi("dd")"

Running this exec gives something like "DDname allocated is SYS00746"

However, if any.dataset.name is already allocated to an alternate DDNAME
that is not in concatenation then, instead of allocating a new DDname it
just returns the DDNAME of the existing allocation. 

You can see this with this code

Address tso "alloc fi(abug) da('any.dataset.name') shr resue"

Call bpxwdyn "Alloc rtddn(dd) da('any.dataset.name') shr reuse"

Say 'DDname allocated is 'dd

Call bpxwdyn "Free fi("dd")"

And you will get "DDname allocated is ABUG"

Problem is because I'm not getting a new allocation my FREE is freeing up a
DDNAME allocated by a totally different process.  In my case causing an
abend sometime later because a DDname that should be allocated is not.

This doesn't seem right to me.  An "ALLOC" should do a new allocation every
time.   

 

Comments ????

 

 

Gary Freestone   

 


----------------------------------------------------------------------
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