Conditionally execution of step

I have 10 steps in my job, how can i execute second step without executing first step, without using restart and commenting first step?

Questions by rpg0247   answers by rpg0247

Showing Answers 1 - 16 of 16 Answers

Santosh kumar

  • Jul 21st, 2011
 

in job statement give Restart=stepname, then the job will start form that step, at the end of that step give sysabend and sysdump statement with a dummy dataset, then after the execution of that step job will end. i think this will works

  Was this answer useful?  Yes

Aloke Deb

  • Jul 25th, 2011
 

Override the first step with the dataset name and parameters of the second step and then use the "//" after the step.

  Was this answer useful?  Yes

Vinay

  • Aug 6th, 2013
 

First use a variable as a symbollic parameter. Use this parameter in if Condition.

E.g

Code
  1. //Job Card

  2. // SET A= 1

  3. //   IF &A NE 1 THEN

  4. //STEP1 EXEC PGM=ABC

  5. // ELSE

  6. //STEP2 EXEC PGM=

  7. //STEP3

  8. //STEP4

  9. ...

  10. //STEP100

  11. // ENDIF

  12.  

  13.  



The value of variable A is 1 . When if condition encounter it checks the value of variable A. The condition becomes false and the step 1 is never execute and all the steps in Else statement will execute.

  Was this answer useful?  Yes

Sreenivas

  • Apr 26th, 2014
 

you can code COND=ONLY in the first Job step, so that the first job step never execute

  Was this answer useful?  Yes

Rishu

  • Jul 28th, 2014
 

If you want to run any particular step only, use IEBEDIT. this is the most powerful utility.
EXEC PGM=IEBEDIT
:
EDIT TYPE = INCLUDE
STEPNAME=(STEP2)

srinivas polepalli

  • Sep 2nd, 2014
 

Hi Rishu,
Can you please explain in details and please given the complete JCl and explain clearly about the utility.

Thanks in advance

  Was this answer useful?  Yes

praneeth

  • Sep 13th, 2014
 

//SAMIEBED JOB (Information), ,CLASS=A,

// MSGCLASS=T,NOTIFY=&SYSUID

//*===========================================================

//* EXAMPLE FOR IEBEDIT UTILITY

//*===========================================================

//STEP01 EXEC PGM=IEBEDIT

//SYSUT1 DD DSN=USERID.TEST.JCLLIB(JOB1),DISP=SHR

//SYSUT2 DD SYSOUT=(*,INTRDR)

//SYSPRINT DD SYSOUT=*

//SYSIN DD *

EDIT TYPE=INCLUDE,STEPNAME=(STEP02)

/*


Where



USERID.TEST.JCLLIB is the Library containing the Input JCL



and



JOB1 is the input JCL name

  Was this answer useful?  Yes

Ganesh

  • Nov 10th, 2014
 

Add COND=ONLY after the EXEC statement for the step that needs to be skipped.

  Was this answer useful?  Yes

Debi

  • Nov 12th, 2014
 

BY specifying a dummy step in the first step and by providing COND in real step1,,we can by-pass the first step

  Was this answer useful?  Yes

varul

  • Dec 1st, 2014
 

directly cond parameter specifying 0

  Was this answer useful?  Yes

varul

  • Dec 1st, 2014
 

IEBEDIT is a separate step can i know where this step is placed?

  Was this answer useful?  Yes

ameer

  • Apr 29th, 2015
 

Restart = step2 in job card and cond=(0,LT) in step 2

  Was this answer useful?  Yes

Ranjith kumar reddy.P

  • May 27th, 2015
 

edit statement can be used

  Was this answer useful?  Yes

Nagaraju

  • May 23rd, 2017
 

Using COND Parameter, cond parameter coded on step1 in these ways COND=ONLY

  Was this answer useful?  Yes

dhin

  • Sep 4th, 2017
 

Using IEBEDIT utility

  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