Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Setting return code in idcams

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Setting return code in idcams
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

Moderator Team Head


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

PostPosted: Sat Nov 19, 2005 2:04 am    Post subject: Re: RC in idcams
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us