View previous topic :: View next topic
|
Author |
Message |
Ashaaz
New User
Joined: 17 Dec 2009 Posts: 2 Location: India
|
|
|
|
Hi,
I have below steps in my JCL. Could you please guide me how to put condition on the requirement mentioned below:-
STEP05
STEP10
STEP15
STEP20
STEP25
STEP35 , cond(0,LT)
STEP35, cond(0,LT)
How to put a cond in Step 35 and 40 on the requirement.
STEP35 and STEP40 should not execute when STEP05,STEP10,STEP15 and STEP20 gives an return code other than zero.
but STEP35 and STEP40 should execute even if step25 gives a return code 4. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Click the "IBM Manuals" button at the top of any page.
Read the section regarding COND= or better still the IF/THEN/ELSE/ENDIF section.
Please feel free to post further if you have problems understanding this. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
What if STEP05,STEP10,STEP15 and STEP20 gives gives non zero and
STEP25 gives 4? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Sambhaji wrote: |
What if STEP05,STEP10,STEP15 and STEP20 gives gives non zero and STEP25 gives 4? |
That is why I suggested the IF/THEN/ELSE/ENDIF section.
Far more flexible and easier to comprehend.
And in fact, given Sambhaji's scenario - the only viable solution. |
|
Back to top |
|
|
Ashaaz
New User
Joined: 17 Dec 2009 Posts: 2 Location: India
|
|
|
|
Sambhaji,
In response to your answer,
Step35 and Step40 should bypass |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Expat wrote: |
That is why I suggested the IF/THEN/ELSE/ENDIF section.
Far more flexible and easier to comprehend.
|
Yeah.. Thats right.. I was just trying to make poster clear on his own requirement.. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
I wonder why for cond code and if/then else logic people have not learned or have not been taught on how to simulate it
Code: |
//jobname JOB ......
//*
//step1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SET MAXCC=<somevalue>
//step2 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SET MAXCC=<somevalue>
//step3 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SET MAXCC=<somevalue>
//step... EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SET MAXCC=<somevalue> |
adding the proper COND and IF/THEN/ELSE
and changing appropriately the MAXCC setting
anybody can emulate/simulate/test all the return code combinations,
easily and without troubles |
|
Back to top |
|
|
|