Execute a specific step in a JCL.
-
- New Member
- Posts: 5
- Joined: Sun Jun 07, 2015 11:08 pm
Execute a specific step in a JCL.
Hi,
In a JCL which have 100 steps. In that, if I want to execute only the 13th step then I can by using RESTART=STEP13 in the job card. I alos need to put a null statement after the 13th step. Is there any other way to do this? I do not a way of doing it. Can there beother way, please suggest me. I faced this in an iterview which went almost good apart from this question.
In a JCL which have 100 steps. In that, if I want to execute only the 13th step then I can by using RESTART=STEP13 in the job card. I alos need to put a null statement after the 13th step. Is there any other way to do this? I do not a way of doing it. Can there beother way, please suggest me. I faced this in an iterview which went almost good apart from this question.
- Akatsukami
- Global Moderator
- Posts: 122
- Joined: Tue Oct 20, 2015 3:20 am
- Location: Bloomington, IL
- Contact:
Re: Execute a specific step in a JCL.
First of all, realize that this a trick question; you'd seldom if ever want to do this in real life.
Possible ways of doing this would be:
Possible ways of doing this would be:
- Deleting all lines after STEP13, and either using the TSO SUBMIT command or writing the modified JCL to the internal reader, depending on the environment.
- Enclosing STEP14 through STEP100 in a suitable IF-THEN-ELSE construct.
"I come to the conclusion that, men loving according to their own will and fearing according to that of the prince, a wise prince should establish himself on that which is in his own control and not in that of others." -- Niccolò Machiavelli
-
- Website Team
- Posts: 70
- Joined: Wed Jul 31, 2013 10:19 pm
Re: Execute a specific step in a JCL.
Hi,
Just adding one more way to Akatsukami..
Codeon Job card
Just adding one more way to Akatsukami..
Code
Code: Select all
Restart =STEP13,COND=(0,LE)
-
- Global Moderator
- Posts: 837
- Joined: Wed Sep 11, 2013 3:57 pm
Re: Execute a specific step in a JCL.
and ... what would be a practical use of this horse manure(*)
(*)
normally horse manure would be much more useful than these kind of gimmiks
(*)
normally horse manure would be much more useful than these kind of gimmiks
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
-
- New Member
- Posts: 5
- Joined: Sun Jun 07, 2015 11:08 pm
Re: Execute a specific step in a JCL.
Thanks for the other options. I have ore answer for the interview.Akatsukami wrote: First of all, realize that this a trick question; you'd seldom if ever want to do this in real life.
Possible ways of doing this would be:
- Deleting all lines after STEP13, and either using the TSO SUBMIT command or writing the modified JCL to the internal reader, depending on the environment.
- Enclosing STEP14 through STEP100 in a suitable IF-THEN-ELSE construct.
-
- New Member
- Posts: 5
- Joined: Sun Jun 07, 2015 11:08 pm
Re: Execute a specific step in a JCL.
Not sure what do you want to say. I was just thimking if I can prepare better for next interview. Please advise if I should have asked it some other forum?
-
- New Member
- Posts: 5
- Joined: Sun Jun 07, 2015 11:08 pm
Re: Execute a specific step in a JCL.
Thanks for the other option Chandan. But if add only this steps after 13 will anyways get executed?Chandan Yadav wrote: Hi,
Just adding one more way to Akatsukami..
Codeon Job cardCode: Select all
Restart =STEP13,COND=(0,LE)
-
- New Member
- Posts: 9
- Joined: Thu Jan 21, 2016 12:16 pm
-
- Website Team
- Posts: 70
- Joined: Wed Jul 31, 2013 10:19 pm
Re: Execute a specific step in a JCL.
Once your step 13 executed with Restart parameter then COND parameter on JOb card will be applicable to all other steps and (0,LE) will be always true
-
- Job-Opening Moderator
- Posts: 1
- Joined: Fri Jul 22, 2016 5:42 pm
Re: Execute a specific step in a JCL.
This would include Step name STEP010 of Jcl JOBNAM1 present in library
USERID.ABC.JCLLIB
USERID.ABC.JCLLIB
Code: Select all
//IEBEDITA JOB (XXXXXXXX,,,,,XXXX),' ',CLASS=T,
// MSGCLASS=Y,NOTIFY=&SYSUID
//*===========================================================
//* EXAMPLE FOR IEBEDIT UTILITY
//*===========================================================
//STEP001 EXEC PGM=IEBEDIT
//SYSUT1 DD DSN=USERID.ABC.JCLLIB(JOBNAM1),DISP=SHR
//SYSUT2 DD SYSOUT=(*,INTRDR)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
EDIT TYPE=INCLUDE,STEPNAME=(STEP010)
/*
-
- New Member
- Posts: 9
- Joined: Thu Jan 21, 2016 12:16 pm
Re: Execute a specific step in a JCL.
Thanks. Ido see IEBEDIT answer on many places on websites but in my real JCLS I have at work place I have never seen it being used. Is it used only in theory and for interviews?msivakarthikmf wrote: This would include Step name STEP010 of Jcl JOBNAM1 present in library
USERID.ABC.JCLLIB
Code: Select all
//IEBEDITA JOB (XXXXXXXX,,,,,XXXX),' ',CLASS=T, // MSGCLASS=Y,NOTIFY=&SYSUID //*=========================================================== //* EXAMPLE FOR IEBEDIT UTILITY //*=========================================================== //STEP001 EXEC PGM=IEBEDIT //SYSUT1 DD DSN=USERID.ABC.JCLLIB(JOBNAM1),DISP=SHR //SYSUT2 DD SYSOUT=(*,INTRDR) //SYSPRINT DD SYSOUT=* //SYSIN DD * EDIT TYPE=INCLUDE,STEPNAME=(STEP010) /*
-
- New Member
- Posts: 9
- Joined: Thu Jan 21, 2016 12:16 pm
Re: Execute a specific step in a JCL.
COND=(0,LE) is like, if the RC of the previous step is less than 0 don't execute "step13", which is not possible. So agree step13 would execute but rest of the steps will also execute. I was not supposed to execute step15, step15...
Re: Execute a specific step in a JCL.
IEBEDIT is a standard IBM utility. Refer to the utilities manual for information.
Regards
Nic
Nic
- Robert Sample
- Global Moderator
- Posts: 1900
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Execute a specific step in a JCL.
A job COND parameter applies to all steps, so the COND=(0,LE) would apply to all steps after STEP13.COND=(0,LE) is like, if the RC of the previous step is less than 0 don't execute "step13", which is not possible. So agree step13 would execute but rest of the steps will also execute. I was not supposed to execute step15, step15...
-
- Website Team
- Posts: 70
- Joined: Wed Jul 31, 2013 10:19 pm
Re: Execute a specific step in a JCL.
As Robert mentioned When I mention COND on JOB parameter it will applicabe to all steps of Jobs, as I am restarting from step 13 it will anyways execute as there is no previous COND parameter to check.
Once Step 13 executed it will apply COND=(0,LE) to all other steps and COND=(0,LE) is like the RC of the previous step is less than or equal to 0 don't execute
I hope its clear else I can suggest you to test it out and let us know if something not working
Thanks,
Chandan
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute