| IBM MAINFRAME HELP & SUPPORT FORUMS Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
|
| View previous topic :: View next topic |
| Author |
Message |
Anand78
Joined: 06 Mar 2006
Posts: 48
Location: PUNE
|
| Posted: Tue Jul 22, 2008 11:44 am Post subject: If COND=(0,LE) is specified to the first step of JCL |
|
|
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
Joined: 18 Jun 2008
Posts: 25
Location: India
|
| Posted: Tue Jul 22, 2008 12:54 pm Post subject: |
|
|
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
Joined: 18 Jun 2008
Posts: 9
Location: Pune
|
| Posted: Tue Jul 22, 2008 4:35 pm Post subject: |
|
|
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
Joined: 28 Jul 2006
Posts: 653
|
| Posted: Tue Jul 22, 2008 4:44 pm Post subject: |
|
|
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
Joined: 18 Jun 2008
Posts: 9
Location: Pune
|
| Posted: Tue Jul 22, 2008 5:24 pm Post subject: |
|
|
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
Joined: 19 May 2007
Posts: 989
Location: Virginia, USA
|
| Posted: Tue Jul 22, 2008 5:33 pm Post subject: |
|
|
| I hope step5 isn't using output from step 4. |
|
| Back to top |
|
Rajesh Sampath
Joined: 18 Jun 2008
Posts: 9
Location: Pune
|
| Posted: Tue Jul 22, 2008 6:05 pm Post subject: |
|
|
| No input for step5 from step4. |
|
| Back to top |
|
sedireswarapu
Joined: 18 Jun 2008
Posts: 25
Location: India
|
| Posted: Tue Jul 22, 2008 7:37 pm Post subject: |
|
|
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
Joined: 14 Jul 2008
Posts: 159
Location: Richfield, MN, USA
|
| Posted: Tue Jul 22, 2008 8:02 pm Post subject: |
|
|
| 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
Joined: 06 Jun 2008
Posts: 891
Location: Atlanta, GA
|
| Posted: Tue Jul 22, 2008 8:06 pm Post subject: |
|
|
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
Joined: 14 Jul 2008
Posts: 159
Location: Richfield, MN, USA
|
| Posted: Tue Jul 22, 2008 8:10 pm Post subject: |
|
|
| I stand corrected on that point. Thanks! :oops: |
|
| Back to top |
|
| |
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
|