View previous topic :: View next topic
|
Author |
Message |
Anand78
New User
Joined: 06 Mar 2006 Posts: 50 Location: PUNE
|
|
|
|
Hi All,
I have two questions to ask.
1. If COND=(0,LE) is specified to the first step of JCL?
I answered like " For first step if COND is specified it is always false and first step executes always if no restart"
2. If JCL have 5 steps S1, S2,S3,S4,S5 in the same order.
How to change the execution irder like excute S4 sfter S5?
I answered to run onetime jobs. |
|
Back to top |
|
|
sedireswarapu
New User
Joined: 18 Jun 2008 Posts: 28 Location: India
|
|
|
|
Hi Anand,
You have answered correctly as far as i know.
For the first question, condition code can only be used to control the execution of subsequent steps depending on the current step 's completion code.
Here, since the COND parameter is coded in the first step, it will be executed anyway as the condition is false.
For the second question, the only way to run the step S4 after S5 is to move the job step down or execute it in a different job. |
|
Back to top |
|
|
Rajesh Sampath
New User
Joined: 18 Jun 2008 Posts: 9 Location: Pune
|
|
|
|
Hi anand,
For your first question,
COND parameter is not coded in the first step.
For your second question,
Use restart parameter in the job card like this
restart=include(step1, step2, step3, step5, step4)
Correct me if im wrong.
With Regards
Rajesh Sampath |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
Quote: |
Use restart parameter in the job card like this
restart=include(step1, step2, step3, step5, step4) |
Which JCL manual did the above come from ?
Gerry |
|
Back to top |
|
|
Rajesh Sampath
New User
Joined: 18 Jun 2008 Posts: 9 Location: Pune
|
|
|
|
Really sorry,
Im wrong.
We solve the problem by using IEBEDIT utility with EDIT TYPE = include, Stepname = (Step1, Step2, Step3, Step5, Step4) in SYSIN statement
With Regards
Rajesh Sampath |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
I hope step5 isn't using output from step 4. |
|
Back to top |
|
|
Rajesh Sampath
New User
Joined: 18 Jun 2008 Posts: 9 Location: Pune
|
|
|
|
No input for step5 from step4. |
|
Back to top |
|
|
sedireswarapu
New User
Joined: 18 Jun 2008 Posts: 28 Location: India
|
|
|
|
Rajesh,
I tried using IEBEDIT utility to see if the order of the steps in a job can be changed. It looks like we cannot change the order of the job steps through the INCLUDE type in the EDIT statement, but we can only include or exclude the job steps from one or more jobs.
For example,
I ran the below IEBEDIT step and its input contains a job with 5 steps (R010, R020, R030, R040 & R050 in the same order).
Code
//STEP1 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=A
//SYSUT1 DD DSN=INPUT.PDS(MEMBER),DISP=OLD,KEEP)
//SYSUT2 DD DSN=OUTPUT.FILE,DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,50,10),RLSE),DCB=RECFM=F,LRECL=80,BLKSIZE=80)
//SYSIN DD *
EDIT TYPE=INCLUDE,STEPNAME=(R010,R020,R030,R050,R040)
/*
//*
Though i have changed the order of job steps in the EDIT statement above, OUTPUT.FILE had the job steps in the same order as it was in the input.
Please correct me if am wrong. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
I believe several of the replies to the original poster are not correct. The COND parameter determines whether or not the current step is bypassed or executed based on the result of previous steps or the step named in the COND parameter(s). In other words, if COND=(0,LE) is coded on the 1st step of a job, that step will be bypassed since zero is less than or equal to any previous step. The condition is true in all cases. Since I don't have access to a mainframe, the best way to find out is to test it yourself. It's easy enough to create a test job consisting of a bunch of IEFBR14 job steps. COND evaluations only determine whether the current step is executed. It has no effect on subsequent steps. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
From the JCL reference manual:
Quote: |
16.5.4 Location in the JCL
You can specify the COND parameter on any EXEC statement in the job. However, the system evaluates a COND parameter on the first EXEC statement in a job as false. |
|
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
I stand corrected on that point. Thanks! |
|
Back to top |
|
|
|