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

How to code the JCL for this?


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

New User


Joined: 07 Nov 2006
Posts: 16
Location: banglore

PostPosted: Wed Nov 29, 2006 3:14 pm
Reply with quote

There are 4 steps in a job(say step1, step2 ,step3,step4). the condition is that if
Return code of step 1=0 execute step 1,step2,step4
if return code of step1 >0 execute step1,step 3,step4
how to code this JCL?
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Nov 29, 2006 3:29 pm
Reply with quote

Hi There,

//STEP1 EXEC PGM=PROG1
//STEP2 EXEC PGM=COBPROG1,COND=(0,NE,STEP1)
//STEP3 EXEC PGM=COBPROG2,COND=(0,LE,STEP1)
//STEP4 EXEC PGM=COBPROG2,COND=(0,LT,STEP1)



Correction r welcome
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Nov 29, 2006 4:39 pm
Reply with quote

//STEP1 EXEC PGM=PROG1
// IF (STEP1.RC = 0) THEN
//STEP2 EXEC PGM=PROG2
// ENDIF
// IF (STEP1.RC > 0) THEN
//STEP3 EXEC PGM=PROG3
// ENDIF
//STEP4 EXEC PGM=PROG4
Back to top
View user's profile Send private message
arunpvarier

New User


Joined: 07 Nov 2006
Posts: 16
Location: banglore

PostPosted: Wed Nov 29, 2006 4:46 pm
Reply with quote

Thanks for responce...


arun
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 run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts Monitoring production job progress. N... JCL & VSAM 4
Search our Forums:

Back to Top