On 7/05/2015 1:34 AM, Charles Mills wrote:
Annoying that BPXWDYN cannot return a DD name. Have to do some serious thinking
about the implications of a hard DD name.
I generate my own unique DDnames. It's as simple as keeping a static
counter and incrementing it on each call to getNextNameToken(), which
returns a string in the form CNNNNNNN. I use those tokens for all sorts
of things that require unique standard MVS names.
Resigned to the possibility of having to use C dynalloc(). I remember it as
being a PITA but the only other time I used it I was brand new to C and
especially C on Z and so it may not be so bad as I recall
dynalloc() is not without it's flaws. I don't like the way it uses char
* for parameter strings. You can easily get burned with dangling
pointers. One of the problems with using fopen() magic allocation is
that if it fails it's hard to debug. All you can do is check the __amrc
structure and try to make sense of it. I've seen cases where a RACF
violation was reported as a failure in CAMLST. Better to use dynalloc()
IMO. If you setup dynalloc to use the S99RBX extension you can get back
the IKJ* error messages if it fails. I've got a C++ dynalloc() wrapper
that throws and exception with those messages. Contact me offlist if
you're interested.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN