I have a need to dynamically allocate a DDNAME to our step before I know if the DDNAME will be input or output.
I am interested in a program, maybe named DYNALLOC, that I can pass BPXWDYN parms into (just like the -x parm to TO/FROM DSN) where the end result is a DDNAME allocated to my step but no pipe yet.
Later in the job step, when I know the file is to be used as input or output, I will execute the TO/FROM DSN with the //DD: parm.
Some additional background:
The jobs I am supporting need to allocate the DDNAME to the step, determine if there were errors (RACF, INUSE, Duplicate Name, etc..) and then later in the job read from, write to, or both. In order to support this existing logic I need to allocate a file w/o using it right away.
Thanks!
P.S. If you happen to create the C program for this, I would be happy to give it a run. I suspect this will likely be a subset of the existing TO/FROM DSN program.
- Scott Bennett
Hewitt Associates
Looking for ability to BPXWDYN w/o using TO/FROM DSN
Here's a simple REXX example: (put this into a HFS/zFS file and make the file executable):
for example, if the you name the command "bpxwdyn", then you can do this:
Code: Select all
/* REXX */
parse arg keywords
if BPXWDYN(keywords) != 0 then do
exit RC
end
Code: Select all
bpxwdyn "alloc dd(mydd) da(my.dataset) shr msg(2)"