IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Split one existing proc depending on the return codes.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pratikb83

New User


Joined: 30 Mar 2006
Posts: 2

PostPosted: Wed Apr 16, 2008 1:43 pm
Reply with quote

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
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Wed Apr 16, 2008 2:12 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Apr 16, 2008 3:24 pm
Reply with quote

Why not try it out and see what happens ?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts Adding first / last acct numerber to ... DFSORT/ICETOOL 7
No new posts JCL/SORT to Split Records SYNCSORT 28
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
Search our Forums:

Back to Top