Copy-Step with variable DSN



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Copy-Step with variable DSN

Postby lostcontinent » Thu Oct 08, 2015 4:33 pm

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
lostcontinent
 
Posts: 13
Joined: Tue Jul 27, 2010 1:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Copy-Step with variable DSN

Postby steve-myers » Thu Oct 08, 2015 5:07 pm

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.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Copy-Step with variable DSN

Postby lostcontinent » Fri Oct 09, 2015 10:11 am

thank you!
We use UC4, but I guess it's working the same way.
I'll figure it out
lostcontinent
 
Posts: 13
Joined: Tue Jul 27, 2010 1:47 pm
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post