View previous topic :: View next topic |
Author |
Message |
mi1dzyr Beginner
Joined: 10 Jul 2003 Posts: 3 Topics: 1 Location: Los Angeles
|
Posted: Thu Jul 10, 2003 2:06 pm Post subject: Coding a step to process only if prior step abends. |
|
|
How do you code the COND param so that it only executes the step if the previous step abends (with say a U00004) abend code? |
|
Back to top |
|
 |
mi1dzyr Beginner
Joined: 10 Jul 2003 Posts: 3 Topics: 1 Location: Los Angeles
|
Posted: Thu Jul 10, 2003 2:42 pm Post subject: |
|
|
I think the simple answer is coding COND=ONLY; however another issue arises:
I'd like to execute a new step that will use IEBGENER to call a PDS member if STEP1 abends. but if you look at the last statement of STEP1 there's an IF STEP1.RC param. How do I get the new step to execute only if STEP1 abends while retaining the IF clause that executes STEP2 if the RC condition is met?
//STEP1 EXEC PGM=COPPER
//STEPLIB DD DSN=MY.IMPLOAD,DISP=SHR
// DD DSN=MY.LOADLIB,DISP=SHR
// DD DISP=SHR,DSN=CUSTOM.LOADLIB
// DD DISP=SHR,DSN=MY.ONL.LOADLIB
// DD DISP=SHR,DSN=MY.CAILIB
//SYSABEND DD SYSOUT=&OUTT
//SYSABOUT DD SYSOUT=&OUTT
//SYSLIST DD SYSOUT=&OUTT
//SYSPRINT DD SYSOUT=&OUTT
//SYSOUT DD SYSOUT=&OUTT
//*
//COPPEROK DD DSN=&&MY430,DISP=(OLD,DELETE,DELETE)
//*
//*=====================================*
//COPPERD0 IF STEP1.RC LE 4 THEN
//*=====================================*
//STEP2 EXEC PGM=GOLD
 |
|
Back to top |
|
 |
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Thu Jul 10, 2003 2:43 pm Post subject: |
|
|
Hi
I prefer using IF:
Code: | // IF ABEND THEN
//STEP02 EXEC....
// ENDIF |
O.
________
Suzuki SV1000 history
Last edited by ofer71 on Sat Feb 05, 2011 10:58 am; edited 1 time in total |
|
Back to top |
|
 |
mi1dzyr Beginner
Joined: 10 Jul 2003 Posts: 3 Topics: 1 Location: Los Angeles
|
Posted: Thu Jul 10, 2003 2:47 pm Post subject: |
|
|
thanks O, I've modified my question abit to suit what I'm really after. There's already an IF being utilized to execute STEP2 if the STEP1.RC LE 4. I want to retain that logic but in addition have a new STEPWARN execute only if STEP1 fails.
Frank. |
|
Back to top |
|
 |
Mike Beginner

Joined: 03 Dec 2002 Posts: 114 Topics: 0 Location: Sydney, Australia
|
Posted: Thu Jul 10, 2003 5:40 pm Post subject: |
|
|
Here's two possibilities, I've put the warn step immediately after the step it is associated with, if you had more steps then perhaps you'd want the warn step to warn for all of these steps in which case you place it at the end and in the second case with more conditions or perhaps a less specific condition.
//ST01 EXEC PGM=COPPER
//....
//ST01ABND EXEC PGM=WARN,COND=ONLY
// IF ST01.RC LE 4 THEN
//ST02 EXEC PGM=GOLD
......
// ENDIF
or
ST01 EXEC PGM=COPPER
//....
// IF ST01.ABEND THEN
//ST01ABND EXEC PGM=WARN
// ENDIF
// IF ST01.RC LE 4 THEN
//ST02 EXEC PGM=GOLD
.....
// ENDIF _________________ Regards,
Mike. |
|
Back to top |
|
 |
|
|