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

Setting return code in idcams


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Fizu

New User


Joined: 15 Jul 2005
Posts: 6
Location: Argentina

PostPosted: Sat Nov 19, 2005 1:54 am
Reply with quote

hi
in IDCAMS I use a list of commands.
REPRO INFILE(INDD1) OUTFILE(OUTDD1)
REPRO INFILE(HSTDD1) OUTFILE(BACKUP)
is there any way to set that when 1 of the command return > 0 don't follow with the rest?

that is: if the first repro ends with 12, i need the job to stop and don't exec the second repro

thanks
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Sat Nov 19, 2005 2:04 am
Reply with quote

Use some IF/THEN/ELSE logic:

Code:

//STEP0001 EXEC PGM=IDCAMS                       
//SYSPRINT DD   SYSOUT=*                         
//SYSIN    DD   *                                 
  REPRO INFILE(INDD1) OUTFILE(OUTDD1)             
  IF MAXCC = 0 THEN DO                           
    REPRO INFILE(HSTDD1) OUTFILE(BACKUP)         
  END                                             
  ELSE SET MAXCC = 4                             
/*                                               
Back to top
View user's profile Send private message
Fizu

New User


Joined: 15 Jul 2005
Posts: 6
Location: Argentina

PostPosted: Thu Nov 24, 2005 12:26 am
Reply with quote

I used that but like this:
REPRO INFILE(INDD1) OUTFILE(OUTDD1)
IF MAXCC = 0 THEN DO
REPRO INFILE(HSTDD1) OUTFILE(BACKUP)
END
ELSE
DELETE 'TDSD.TEMP'

and when the MAXCC is 0 makes the repro and deletes the TEMP file. I made something wrong?
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 -> DFSORT/ICETOOL

 


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 Return codes-Normal & Abnormal te... JCL & VSAM 7
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
Search our Forums:

Back to Top