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

Can we have a JOBSTEP without any EXEC ?

6 Answers   IBM,


Which is the most widely used batch performance monitor for DB2?

2 Answers  


In JCL I have 5 steps,I need to execute 1st,2nd and 5th steps only,can any one answer me please?

2 Answers   TCS,


Is automatic restart possible in jcl? If yes, how?

0 Answers  


How to use COND Parameter in jcl

4 Answers   NIIT, Wipro,


consider the following progrm statements MOVE 0 TO SW.NO.OF.REC PERFORM PRI-OUT UNTIL SW=1 DISPALY NO.OF.REC STOP RUN PRE-OUT READ IN-FILE AT END MOVE 1 TO SW WRITE OUO-REC FROM IN-REC ADD 1 TO NO.OF REC if the IN-FILE contains 1000 records what value will be displayed after the PERFORM is over? assume that N0.OF.REC has PIC 9(4) a.1000 b.1001 c.1 d.none of the above

1 Answers  


What happens if both JOBLIB & STEPLIB is specified ?

0 Answers  


How do you create a temporary dataset?

0 Answers  


I have a jcl which is using 2 data sets i want to override those data sets. how can i override the files within the JCL. Give me the syntax. Make sure that it is not calling any Proc.

1 Answers  


What do you understand by the term notcat 2 – gs?

0 Answers  


What is 'S0C7' abend?

9 Answers  


How do you submit a JCL under CICS environment ?

5 Answers   Wipro,


Categories