pjnithin
Active User
Joined: 22 Dec 2005 Posts: 116
|
|
|
|
Code: |
//jobname JOB (),' STEP 1 ',
//STEP01 EXEC PGM=EZACFSM1
//SYSOUT DD SYSOUT=(*,INTRDR)
//SYSIN DD DATA
//jobname JOB (),' STEP 2 ',
//STEPK1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSOUT DD *
//SYSUT1 DD DSN=input,
// DISP=SHR
//SYSUT2 DD DSN=input.D&MON.&DAY,
// DISP=(,CATLG,DELETE),
// SPACE=(CYL,(1,2),RLSE),
// UNIT=SYSDA,
// DSORG=PS,
// LRECL=900,
// RECFM=FB
//SYSIN DD DUMMY
/*
|
This job is running fine and giving me the desired output.
But why I have to use another job within the same job?????
What is the reason behind this????
Is there any way by which I can run the second part as just another step in the same jcl itself rather than doing it as a different job. So in the first step I can get the values for month and day and pass it on to the second step where it'll be used |
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
pjnithin wrote: |
So in the first step I can get the values for month and day and pass it on to the second step where it'll be used |
No, JCL doesn't work that way. As a job is submitted, it is checked for syntax, and any variables must be resolved before the job ever starts execution. Only programs are allowed dynamic state changes via either parameter input (PARM=) or from an external source (via an ACCEPT or READ). |
|