Page 1 of 1

Copy-Step with variable DSN

PostPosted: Thu Oct 08, 2015 4:33 pm
by lostcontinent
Hi,
my Job is triggered by a DS (PREFIX.JOBNAME.START) containing one line with a DS-Name (=DSXYZ). This DSXYZ is variable, eg. PREFIX.JOBNAME.D123456 or PREFIX.JOBNAME.D876543

Is there a way to allocate/copy the DSXYZ?

I guess I can do it within a REXX-step (reading in PREFIX.JOBNAME.START and dynamically copy DSXYZ to DSNORM and use DSNORM in a later step)
But ist there any other possibility to do that with JCL (IDCAMS or something like that)?
(I know I could dynamically create a full iebgener JCL and write it on internal Reader - but not allowed in our shop....)

I hope I explained clearly enough,

thank you very much in advance,
frank

Re: Copy-Step with variable DSN

PostPosted: Thu Oct 08, 2015 5:07 pm
by steve-myers
lostcontinent wrote:Hi,
my Job is triggered by a DS (PREFIX.JOBNAME.START) containing one line with a DS-Name (=DSXYZ). This DSXYZ is variable, eg. PREFIX.JOBNAME.D123456 or PREFIX.JOBNAME.D876543 ...
The key word here is "triggered." In other words, some agent, such as a job scheduling package like CA7 or TWS, is actually submitting the job. These agents usually have a mechanism to insert an actual data set name - the data set that actually "triggered" the job - into the JCL it is submitting. Use it. With no knowledge of the agent, no one can assist you. Even then, the advice will most likely be to consult with the operators of the agent that submits the job.

Re: Copy-Step with variable DSN

PostPosted: Fri Oct 09, 2015 10:11 am
by lostcontinent
thank you!
We use UC4, but I guess it's working the same way.
I'll figure it out