View previous topic :: View next topic
|
Author |
Message |
meetsrk
New User
Joined: 13 Jun 2004 Posts: 85
|
|
|
|
I have two set of steps ie 10,20,30 and 40,50,60 under a single job.
I need both of those sets to run, even if either gets abended.
Also step70, which concatenates both the output files that comes step30 and step60 should run when step20 and step50 runs with RC of zero.
is that possible? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
You may need to tweak this a bit, but maybe something like this?
Code: |
//STEP10 EXEC PGM=PROG1
//*
//STEP20 EXEC PGM=PROG2
//*
//STEP30 EXEC PGM=PROG3
//*
// IF (ABEND | STEP10.RUN | STEP20.RUN | STEP30.RUN) THEN
//STEP40 EXEC PGM=PROG4
//*
//STEP50 EXEC PGM=PROG5
//*
//STEP60 EXEC PGM=PROG6
// ENDIF
//*
// IF (?STEP20.ABEND & STEP20.RC = 0 & ?STEP50.ABEND & STEP50.RC = 0)
// THEN
//STEP70 EXEC PGM=PROG7
// ENDIF
//*
|
|
|
Back to top |
|
|
meetsrk
New User
Joined: 13 Jun 2004 Posts: 85
|
|
|
|
Superk .. thanks for the info.
but one more query,
for "IF (ABEND)" What does it check? and when does it flag.
i mean if Condition code > zero then ABEND = True?
Thanks in advance |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
IF ABEND
is TRUE if any of the previous steps abended. As you know, normally the remainder of the job is flushed when an abend condition occurs. Typically, that's what's desired. However, there are times when you may want to continue execution of the subsequent steps even if an abend occurs, as in your case.
Quote: |
... if Condition code > zero then ABEND = True?
|
No. That just means that the Return-Code register was set by a program to contain a value higher than zero. ABEND is still FALSE. |
|
Back to top |
|
|
|