View previous topic :: View next topic
|
Author |
Message |
venkat1111_a1
New User
Joined: 14 Feb 2006 Posts: 8
|
|
|
|
hai,
this is venkat hear is small doubt can any one clear that for me.
How to process the step that we want leaving all the other.
while we r coding in a JCL ,if we have nearly 20 steps to execute & if we want to execute only one step (say step03) . can we give any conditional statements to it. |
|
Back to top |
|
|
smiley Warnings : 1 New User
Joined: 08 Feb 2006 Posts: 27
|
|
|
|
we can use COND parameter to skip all the other steps |
|
Back to top |
|
|
nuthan
Active User
Joined: 26 Sep 2005 Posts: 146 Location: Bangalore
|
|
|
|
Hi,
Give RESTART prerameter in job card like 'RESTART=STEP3' and after the 3rd step keep null statement like // . Then it will execute third step and comes out.
If u want to execute particlar steps depending on some conditions then use COND perameter. |
|
Back to top |
|
|
kumaresh.M
New User
Joined: 17 Feb 2006 Posts: 64 Location: Bangalore
|
|
|
|
we can use the RESTART parameter to do this,
make sure that we can code the restart parameter in JOBCARD,
and further control of steps u use that COND PARAMETER
WITH REGARDS
KUMARESH.M |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Here's the way it's done:
Code cond=(0,le) in the job card; also code restart=step/you/want/to/exec.
The 1st step you exec is the restart step and all the others following are by-passed due to the cond in the job card. |
|
Back to top |
|
|
Ayyappan
New User
Joined: 05 Jul 2005 Posts: 31 Location: India
|
|
|
|
Hi Jack,
But if the return code of the executed step is greater than 0, then i guess, the other steps will get executed.
Please correct me if i am wrong.
Thanks.
Ayyappan |
|
Back to top |
|
|
rajesh_1183
Active User
Joined: 24 Nov 2005 Posts: 121 Location: Tadepalligudem
|
|
|
|
Hi,
try this...........
Code: |
//EDIT3 JOB ...
//STEP1 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=A
//SYSUT1 DD DSNAME=....
//SYSUT2 DD DSNAME=....
//SYSIN DD *
EDIT START=JOBname,TYPE=INCLUDE,STEPNAME=(STEPNAMES which u want to execute each seperated by comma)
/*
|
corrections welcomed...............
Thanks,
Rajesh[/url][/code] |
|
Back to top |
|
|
meenasomu
New User
Joined: 15 Sep 2005 Posts: 17
|
|
|
|
Hi Ayyappan,
Yes if the return code is greater than zero, then the step will get executed.
So, we can use something like this.
Code: |
Proc PROC1 has five steps STEP01,STEP02,STEP03, STEP04 and STEP05.
//JOBA JOB ...,RESTART=PRSTEP.STEP03
//PRSTEP EXEC PROC1,
// COND.STEP04=(0,GE),
// COND.STEP05=(0,GE)
|
Hope this will work to exec only step3 of the proc proc1. Please correct me if i'm wrong.
Thanks,
Meena. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Ay,
No. COND=(0,LE) reads this way: if 0 is less than or equal to a RC passed by any previous step in the job don't exec this step.
Each step in the job tests for this. If the restarted step passes a RC of 12, 0 is less than 12 so no following step executes.
Steps can't issue negative RCs.
P.S. I've used this many times - it's not just a guess. |
|
Back to top |
|
|
kaarthik6_mf
New User
Joined: 27 Feb 2006 Posts: 3
|
|
|
|
Hi
I have faced this question at an interview I was happy to find a very high-level and nice solution for this Rajesh_1183,Can i contact you for more details whever needed.
Thanks
Kartik.FR |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Kartik.FR,
Why not share your knowledge with all members. That's what this Forum is all about. |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
This question continues to appear here without sample JCL provided. It is almost never that easy to just run one step of a job as the fact of prior dataset dependecies or restoration to needed state are never addressed.
If a temp dataset is created in a prior step and is needed in the executed step, it will not be available. If a temp dataset is created in executed step and needs further processing and cataloging in a subsequent step, it is not processed/cataloged. If an updated dataset/database table needs restoration to its prior state, it is not restored.
I worked at places where all QSAM data sets created within the job were passed until the very last step where they were cataloged or discarded. Jobs were limited to roughly 45 minute runs so reruns were manageable.
In most places that I've been a special job is created as a one-time execution.
Perhaps it's me, but this interview question is meaningless. I chuckle to myself every time I see these posts. |
|
Back to top |
|
|
sonu_winks
New User
Joined: 23 Nov 2005 Posts: 23
|
|
|
|
i dont think that we need to complicate things,most of the time we want to achieve this for testing by modifying only the job card.
Jack has the simple and most straight forward soln for this..that works perfectly. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi David,
I've used this when a del/define step or an IEFBR14 is a few steps away from the one I want to restart from, but I need the file fixed first.
It comes in handy and it's quick. |
|
Back to top |
|
|
|