If a job has 3 steps and step 1 and step 3 should get
executed and step 2 should not get executed irrespective of
the return code from the previous steps. How can it be done?
Answers were Sorted based on User's Feedback
Hi..........
We can use condition parameter for step2.
//JOBCARD
//STEP1 EXEC=PGM1
//STEP2 EXEC=PGM2,COND=(0,LE,STEP1)
//STEP3 EXEC=PGM3
//
THANKS
| Is This Answer Correct ? | 30 Yes | 3 No |
Answer / rameshkillampalli
Small correction - stepname=(step2) will allow job to run
step1 and step3 and exclude step2 from execution
//XXXXXXXX JOB (XXX),'XXXXXXXXXXXXXXXXX',MSGLEVEL=(1,1),
// CLASS=D,PRTY=5,MSGCLASS=T,NOTIFY=&SYSUID
//STEP01 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=XXXXXXXX.XXXX.XXXX(MEMBER NAME),DISP=SHR
//SYSUT2 DD SYSOUT=(A,INTRDR)
//SYSIN DD *
EDIT TYPE=EXCLUDE,STEPNAME=(STEP2)
/*
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / rsivar13@gmail.com
In case of Abnormal Termination
Use Restart Parameter for Step2 In Job Card.
And Give condition code for Step3.
Thanks.
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / ramesh
Use IEBEDIT to skip step 2 and execute step1 and step3 as below
//XXXXXXXX JOB (XXX),'XXXXXXXXXXXXXXXXX',MSGLEVEL=(1,1),
// CLASS=D,PRTY=5,MSGCLASS=T,NOTIFY=&SYSUID
//STEP01 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=XXXXXXXX.XXXX.XXXX(MEMBER NAME),DISP=SHR
//SYSUT2 DD SYSOUT=(A,INTRDR)
//SYSIN DD *
EDIT TYPE=EXCLUDE,STEPNAME=(STEP01,STEP05)
/*
| Is This Answer Correct ? | 0 Yes | 1 No |
what is the restart?hopw it is invoked?
Write a JCL by using the below requirement: File1 =1, File2 =11 and output needs to come as File3 =111?
How to execute step2,step1,step3 when step1,2&3 are in order
Which COND paramter will u use to execute the step only if the previous step does not execute
What is the purpose and meaning of the REGION keyword and what JCL statement is it associated with?
What type of versions we r using in mainframe (jcl, cobol, db2, vsam, cics)?
which parameter is used to check the syntax of a jcl without executing it?
Explain about LMFREE�free data set from its association with data ID
How to run cobol program using jcl?
what is the Difference between SYSIN and PARM ?
in order to execute step2 a job after a return code of 8 in step1, what condition you will code in step2?
How do you access a file that had a disposition of KEEP?