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



If a job has 3 steps and step 1 and step 3 should get executed and step 2 should not get executed i..

Answer / mr. cooooool

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

If a job has 3 steps and step 1 and step 3 should get executed and step 2 should not get executed i..

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

If a job has 3 steps and step 1 and step 3 should get executed and step 2 should not get executed i..

Answer / guest

abnormal termination

Is This Answer Correct ?    0 Yes 1 No

If a job has 3 steps and step 1 and step 3 should get executed and step 2 should not get executed i..

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

If a job has 3 steps and step 1 and step 3 should get executed and step 2 should not get executed i..

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

Post New Answer

More JCL Interview Questions

I am having one step in my jcl.in that step,i am calling one proc.In that proc,i have 10 steps.i want to call a particular step in that proc without writing any new jcl ike iebedit utility...

2 Answers   Satyam,


Write a JCL by using the below requirement: File1 =1, File2 =11 and output needs to come as File3 =111?

8 Answers   Saggezza,


Suppose we have 5 steps in a job.No step should be executed After submitting every step in a job

2 Answers   AVB, IBM,


What is one line to pass PARM from JCL to COBOL?

0 Answers  


Brief description of inline procedure of jcl.

0 Answers  






How do you handle empty files in a JCL ?

3 Answers   Wipro, Xansa,


what operation is performed by job statement?

0 Answers   IBM,


what is the difference between the JCLLIB and JOBLIB ,and where do we use it ?

3 Answers   Convergys,


Explain how can an in-stream dataset be terminated?

0 Answers  


1) max no of steps with jcl job can execute 2) how many extentions r possible in sequencial files with job 3) what is set parameter will do 4)how to get syntax errors without sub 5) what is differ between error and abend 6) hw mvs knows who submitted the job and whoom it has to forward 7) what are the positinal parameters of data descripter

1 Answers   L&T,


Explain the purpose of dd dummy statement?

0 Answers  


i have 10 steps in my jcl. -->if i want to execute my program from 5th step what i have to do? don't give //* in ur previous steps --> if i want to execute my program from 1to 5 steps only what i have to do?

2 Answers  


Categories