Page 1 of 1

Howto execute a particular step?

PostPosted: Sat Jul 17, 2010 3:25 pm
by coollearner
Hi,

I have a JCL with 6 steps.
If I want to execute only 4th step, What parameter needs to be specified?

Re: Howto execute a particular step?

PostPosted: Sat Jul 17, 2010 3:45 pm
by expat
Is this a PROC or instream

Re: Howto execute a particular step?

PostPosted: Sat Jul 17, 2010 5:12 pm
by Robert Sample
There are no parameters that allow you to do this. You must edit the JCL, extract the fourth step, and run it. If the job is executing a procedure from a PROCLIB, you can copy the PROCLIB member to your job, make it an instream procedure, and then delete everything but the fourth step.

Re: Howto execute a particular step?

PostPosted: Sat Jul 17, 2010 7:16 pm
by expat
Although for a PROC you could use the following on the jobcard
RESTART=Procname.Procstepname,COND=(0,LE)

Re: Howto execute a particular step?

PostPosted: Sat Jul 17, 2010 8:37 pm
by coollearner
I am not restarting the job

Re: Howto execute a particular step?

PostPosted: Sat Jul 17, 2010 9:33 pm
by NicC
It does not matter if you are restarting the job or not - RESTART tells the system at which step you want to start or restart. However there is no parameter that says STOP AFTER so you have to force an abend in the following step the esaiest way to do this is either to provide a STEPLIB to a library that does not have the program to be executed in it or to over-ride, or supply, a DD with a dataset that does not exist (will not work under JES3 because it checks for datasets before the job starts).

Re: Howto execute a particular step?

PostPosted: Mon Jul 19, 2010 3:12 pm
by ramesh4mainframes
IEBEDIT, Yes by using IEBEDIT utility not only one step you can run all the steps whatever you want. Like 2,4,5,8............ like that.

Re: Howto execute a particular step?

PostPosted: Tue Jul 20, 2010 11:21 am
by smita257
You can either use Cond parameter or can use IEBEDIT utility.
//STEP0001 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD DSN=xxxxx.yyyyy.zzzzz,DISP=SHR
//SYSUT2   DD SYSOUT=(*,INTRDR)
//SYSIN    DD *
    EDIT START=JOBNAME,TYPE=INCLUDE,STEPNAME=(STEP04)
/*


xxxxx.yyyyy.zzzzz This input dataset is your jcl which contains the steps.

Re: Howto execute a particular step?

PostPosted: Tue Jul 20, 2010 3:39 pm
by coollearner
Thanks Smita for the wonderful answer