I have four steps in jcl they are STEP1,STEP2,STEP3 and STEP4.
Can it possible to run the reverse order like step4 first
then step3,step2,step1?
Answers were Sorted based on User's Feedback
Answer / muttaiah
JCL processes steps sequentially i mean to say we have ways
to skip steps but we don't have a way to run steps in
reverse or random way. EX; i have a job with steps 1, 2, 3.
Executing steps 3, 1, 2 is not at all possible.
If you want to do so then you have to write a new JCL with
IEBEDIT utility. Here is the JCL.
//JOBCARD AS PER INSTALLATION
//STEP1 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=FILE1,DISP=SHR
//SYSUT2 DD SYSOUT=(*,INTRDR)
//SYSIN DD *
TYPE=INCLUDE,STEPS=(STEP4,STEP3,STEP2,STEP1)
/*
//
Here file1 can either be PDS/PS that holds the actual JCL.
Type=Include will copy the steps specified in the sequence
as per STEPS parm
In real time there won't be any scenario as such..If any
interviewer asks this question then blast him with this
answer. Tell him not to waste your time by such questions
| Is This Answer Correct ? | 44 Yes | 2 No |
Just correction on above answers, It will work
//JOBCARD AS PER INSTALLATION
//STEP1 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=FILE1,DISP=SHR
//SYSUT2 DD SYSOUT=(*,INTRDR)
//SYSIN DD *
EDIT TYPE = INCLUDE,STEPNAME=(STEP4,STEP3,STEP2,STEP1)
/*
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / premadevi
//JOBCARD AS PER INSTALLATION
//STEP1 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=FILE1,DISP=SHR
//SYSUT2 DD SYSOUT=(*,INTRDR)
//SYSIN DD *
TYPE=EDIT,INCLUDE=(STEP4,STEP3,STEP2,STEP1)
/*
//
| Is This Answer Correct ? | 0 Yes | 0 No |
How to view the hexa decimal value thru file aid if copy book is not present for that particular data
what is use of disp parameter in dd statement?
What 3 guidelines do we have to follow when concatenating DD statements?
My JOB contains three steps. //STEP1 EXEC PGM=ABC //STEP2 EXEC PGM=DEF //STEP3 EXEC PGM=GHI My Question is 1) I want to execute second step only. How will do. 2) Soppose U consider above three steps are in PROC steps and I want execute the PROC second step only? How to execute the second step only. During exection time its creating any ABEND? Please let me know..........
can a job be submitted through jcl only? is there another way to submit a job?
If job is submitted with typerun = hold then how can we submit the same job?
What is the difference between joblib and jcllib statements
what sort card you will use to copy the data from one dataset to another dataset?
What is COND=EVEN ?
What is the exact difference between PRTY and DPRTY
How is a GDG base created?
How to skip first step of a job? Can we use COND on the first step?