I'm writing a REXX stage that needs to allocate a bunch of data sets,
run some programs, read the data sets, and then free them.  If I'm going
to use more than one copy of the stage in a pipeline set, I need to do
that whole mess in one shot without letting any other stages run, since
they'll all need to use the same DDnames.

Problem is, the TSO command environment isn't available, so the only
route I see to issue the commands is CALLPIPE TSO, which potentially
lets the whole rest of the pipeline set run.  Even if I used NOCOMMIT to
prevent anybody from reading or writing to the pipeline, other copies of
my REXX stage would also issue NOCOMMIT and be allowed to run their
CALLPIPEs.

But I notice that the TSO stage is or calls a REXX stage to which the
TSO environment *is* available.  Have I missed some magic that I could
use to make it available to my stage?

Failing that, the best option I've come up with is a loop that checks
whether the first data set is already allocated and SUSPENDs until it's
free.  That will obviously choke if it's allocated before the pipeline
starts, or if my stage fails before freeing it.  Any better ideas?

¬R

Reply via email to