View previous topic :: View next topic |
Author |
Message |
Anovice Beginner
Joined: 18 Feb 2004 Posts: 12 Topics: 2
|
Posted: Mon Mar 08, 2004 1:37 am Post subject: High RC for one step. |
|
|
How can I allow a high return code omly
for one particular step in a job.
say
STEP1 PGM=A
STEP2 PGM=B
STEP3 PGM=C
STEP4 PGM=D
........
........
STEPn PGM=
Now STEP1 alone can have a return code of 16 and others
should have a return code of 0.
I should execute STEPs 2, 3, 4...even if I get RC <= 16
for STEP1. I tried coding condition codes something like this
COND=((16,LT,STEP1),(0,NE,STEP2),(0,NE,STEP3),... for STEPn.
But it becomes messy as my job has around 30 steps.
Please let me know if anyone has some suggestions. |
|
Back to top |
|
 |
raggop Beginner

Joined: 05 Feb 2003 Posts: 19 Topics: 3
|
Posted: Mon Mar 08, 2004 5:10 am Post subject: |
|
|
why don't you put steps 2..n in a IF block and check for the RC of step A at the start..
raghu |
|
Back to top |
|
 |
Anovice Beginner
Joined: 18 Feb 2004 Posts: 12 Topics: 2
|
Posted: Mon Mar 08, 2004 5:18 am Post subject: |
|
|
I forgot to mention something.
I want step2 thru step N to run when return code <= 16. At the sametime
I also want the 0,NE cond code check to exist for the other steps.
I have already thought abt the IF but it wont work. The other steps wont run as a high cond code is produced in the first step. If I code a COND=(16,LT,STEP1) for all steps then any other step too will getaway with a <=16 cond code which I dont want to happen. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Mar 08, 2004 6:34 am Post subject: |
|
|
Anovice,
code an abend statement as below after each step from step2 to step N except for step 1.
Code: |
//STEP2A EXEC PGM=ABEND99,
// COND=(0,EQ,STEP2A)
//SYSUDUMP DD SYSOUT=*
//*
|
i.e
Code: |
STEP1 PGM=A
STEP2 PGM=B
//STEP2A EXEC PGM=ABEND99,
// COND=(0,EQ,STEP2A)
//SYSUDUMP DD SYSOUT=*
//*
STEP3 PGM=C
//STEP3A EXEC PGM=ABEND99,
// COND=(0,EQ,STEP3A)
//SYSUDUMP DD SYSOUT=*
//*
STEP4 PGM=D
........
........
STEPn PGM=
//STEPNA EXEC PGM=ABEND99,
// COND=(0,EQ,STEPNA)
//SYSUDUMP DD SYSOUT=*
//*
|
So if any of the steps get an return code other than zero this abend step will execuete and job will stop its execuetion.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Anovice Beginner
Joined: 18 Feb 2004 Posts: 12 Topics: 2
|
Posted: Mon Mar 08, 2004 7:03 am Post subject: |
|
|
Thanks Kolusu,
Iam also trying a combination of IF ELSE construct and COND CODE to arrive at a solution. I have to give my customer these options for him to choose. |
|
Back to top |
|
 |
Mike Chantrey Intermediate
Joined: 10 Sep 2003 Posts: 234 Topics: 1 Location: Wansford
|
Posted: Mon Mar 08, 2004 9:17 am Post subject: |
|
|
Note that ABEND99 is presumably site-specific (e.g. our equivalent is called GDIABEND). You may have an equivalent already, or you may need to write one if you don't. Ask your sysprogs... |
|
Back to top |
|
 |
Anovice Beginner
Joined: 18 Feb 2004 Posts: 12 Topics: 2
|
Posted: Mon Mar 08, 2004 10:28 pm Post subject: |
|
|
Thanks all for your suggestions. |
|
Back to top |
|
 |
|
|