View previous topic :: View next topic
|
Author |
Message |
pratikb83
New User
Joined: 30 Mar 2006 Posts: 2
|
|
|
|
how can i split one existing proc depending on the return codes.there is a check for return codes for every step and i need to split it how can i go ahead.
for example if there are 20 steps in my proc and i split it to 2 procs with 10 steps each and here the 11th step is having a condition check of (5,LT)
then will the JCL run 11th step from the second proc. |
|
Back to top |
|
|
mkk157
Active User
Joined: 17 May 2006 Posts: 310
|
|
|
|
hi Pratik,
welcome to the forums.
There is no need to split the proc into 2 different proc's, If your requirement is to add a condition at the step11.
see the below example for more understanding.
//STEP0010 EXEC PGM=SORT
//SORTIN DD DSN=INPUT-FILE-NAME-1
//SORTOUT DD DSN=OUTPUT-FILE-NAME-1
//SYSIN DD DSN=SORT-CARD-LOCATION
//CHECK0010 IF (STEP0010.RC NE 0) THEN
//*
//STEP0015 EXEC @SPWARN
//CHECK0010 ENDIF
//*
//STEP0020 EXEC PGM=SORT
//SORTIN DD DSN=INPUT-FILE-NAME-2
//SORTOUT DD DSN=OUTPUT-FILE-NAME-2
//SYSIN DD DSN=SORT-CARD-LOCATION
//CHECK0020 IF (STEP0020.RC NE 0) THEN
//*
//STEP0025 EXEC @SPWARN
//CHECK0020 ENDIF
//*
//* sTEPS FROM 3 TO 9
//*
//STEP0100 EXEC PGM=SORT
//SORTIN DD DSN=INPUT-FILE-NAME-10
//SORTOUT DD DSN=OUTPUT-FILE-NAME-10
//SYSIN DD DSN=SORT-CARD-LOCATION
//CHECK0100 IF (STEP0100.RC NE 0 AND STEP0100.RC LT 5) THEN
//*
//STEP0105 EXEC @SPWARN
//CHECK0100 ENDIF
//*
//CHECKIT IF (STEP0100.RC LT 5) THEN
//*
//STEP0110 EXEC PGM=SORT
//SORTIN DD DSN=INPUT-FILE-NAME-11
//SORTOUT DD DSN=OUTPUT-FILE-NAME-11
//SYSIN DD DSN=SORT-CARD-LOCATION
//CHECK0110 IF (STEP0100.RC NE 0 AND STEP0100.RC LT 5) THEN
//*
//STEP0115 EXEC @SPWARN
//CHECK0110 ENDIF
//*
//CHECKIT ENDIF
Please get back to us, If u have any further queries. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Why not try it out and see what happens ? |
|
Back to top |
|
|
|