JCL Program Execution

If a JCL containing 5 steps in a proc, how will you execute only 2nd and 4th steps?

Questions by sukesh.gopisetty

Showing Answers 1 - 25 of 25 Answers

You can use IEBEDIT utility for it..you will have 2 DD statements.In first statement you will assign job in which have job steps and second will be the new which contains only those steps which will be excuted in order.

//SYSIN DD *
EDIT START= JOBS,COPY = INCLUDE, STEPS= jobstep2, jobstep4....... 
/*

  Was this answer useful?  Yes

dhs01

  • Sep 3rd, 2010
 

There are many ways to accomplish this. You can use the COND parameter to direct which steps will be executed depending on conditions. You could also change the program in steps that you don't want to run to point to IEFBR14 - commenting out the EXEC statements that you want not actually do anything. You could edit the JCL and delete steps that you don't want to execute. 

  Was this answer useful?  Yes

aman007bedi

  • Jan 20th, 2011
 

//job1       job    a123,'name',class=a,
//                        restart=step002
//step001 exec pgm=prog1
//step002 exec pgm=prog2
//step003 exec pgm=prog3,cond=(0,le)
//step004 exec pgm=prog4
//step005 exec pgm=prog5,cond=(0,le)
//step006 exec pgm=prog6

by this coding only prog2 ,prog4 and prog6 will be executed and prog1,prog3,prog6 will be bypassed(not executed).

lrsantosh

  • Jan 21st, 2011
 

One more way is by using If End-if command.


//job1 job a123 'name' class=a 
// restart=step002
//step001 exec pgm=prog1
//step002 exec pgm=prog2
IF RC >= 0
//step003 exec pgm=prog3 
END-IF 
//step004 exec pgm=prog4 
IF RC >= 0
//step005 exec pgm=prog5 cond=(0 le) 
//step006 exec pgm=prog6
END-IF

Hope this helps.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions