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

What does the TIME parameter signify ? What does TIME=1440 mean ?

6 Answers   Accenture, TCS,


How can I override a dsn that is contained in a proc called by another proc? I need to do the override in the calling JCL.

3 Answers  


I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?

0 Answers  


what are the ways of passing data to a cobol program from jcl?

1 Answers   IBM,


. What is the difference between the following statements : I) step#1 exec PGM=accpay ii) step#1 exec tbalance

1 Answers  






What are three parameters you can specify on Job statement as well as on exec stmt ?

1 Answers  


How many instream we can write in single jcl?

1 Answers  


how will be submit 1 jcl by other jcl? means that how 'll submit one job by other job??

3 Answers   Steria,


What you mean by skeleton JCl?

2 Answers  


Hi, Say I have 10 flat files and I want to copy all these 10 flat files to a GDG versions flat files (I have GDG base: FDWS01.TEST.RESTORE) in one shot. Can we do that in one shot using a JCL. May be by using IEBGENER. It's a bit urgent. So anyone's fast rely would be appreciated.. Thanks in advance.. 10 flat files ----------------------------------- FDWS01.SUB.RESTORE1 FDWS01.SUB.RESTORE2 FDWS01.SUB.RESTORE3 ; ; FDWS01.SUB.RESTORE10 TO GDG versions ----------------------- FDWS01.TEST.RESTORE.G0001V00 FDWS01.TEST.RESTORE.G0002V00 FDWS01.TEST.RESTORE.G0003V00 ; ; FDWS01.TEST.RESTORE.G0010V00

4 Answers  


Suppose I have a file with three fields with data in the following format 1. empid - S9(4) COMP 2. empname - X(20) 3. empsal - S9(5)V(2) COMP-3 If I view this file, it will not be in a readable format. How to display the empid and empsal fields in a readable format without using COBOL program? What kind of SORT card will have to be coded?

4 Answers  


can a job be submitted through jcl only? is there another way to submit a job?

2 Answers   CSC,


Categories