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
 

 

How can I set the Return code of a step ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
mars

New User


Joined: 25 Aug 2005
Posts: 5
Location: chennai

PostPosted: Fri Sep 09, 2005 2:03 pm    Post subject: How can I set the Return code of a step ?
Reply with quote

Hi All,
I am getting return code 43 in a STEP, how can I change the return code and set it to 0, so that other steps would execute.

Please respond. :?
Back to top
View user's profile Send private message

mars

New User


Joined: 25 Aug 2005
Posts: 5
Location: chennai

PostPosted: Fri Sep 09, 2005 4:14 pm    Post subject:
Reply with quote

Hi ,
This is the code, pls chk and let me know if anything wrong.
Code:

//R040    EXEC PGM=IKJEFT01,                     
// PARM='FLTRLST &MEMBER'                       
//SYSEXEC  DD  DSN=&HLQ..&ENV..CNTLCARD,DISP=SHR
//SYSTSIN  DD  DUMMY                             
//SYSPRINT DD  SYSOUT=*                         
//SYSTSPRT DD  SYSOUT=*                         
//WORKLIST DD  DSN=&TEMP,DISP=SHR               
//WORKOUT  DD  DSN=&TEMP2,DISP=(,CATLG),         
//             UNIT=SYSDA,SPACE=(CYL,(10,10)),   
//             DCB=(LRECL=180)                   
//AA IF MAXCC=43 THEN SET MAXCC=0               
//AA ENDIF                                       
//*----------------------------------------------
//*  PRINT THE DB2 LOAD FILE                     
//*----------------------------------------------
//TD050 IF &DEBUG=1 THEN                         
//R050 EXEC PGM=IEBGENER,COND=(55,EQ)           



Here R040 Step returns 43, I want to set that setp return code as 0.
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Fri Sep 09, 2005 5:12 pm    Post subject:
Reply with quote

The only way to do what you need is opening the source of your Rexx and set the Exit Return Code equal to 0.
Code:
Exit 0

In the source you can also test the rc before setting it to 0.
Code:
If Rc = 43 Then Do
  Rc = 0
End


There are no way except this.
For a Cobol program you must move 0 to Return Code and so for the other languages.

I hope in this help
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: Fri Sep 09, 2005 7:29 pm    Post subject: Re: How can I set the Return code of a step ?
Reply with quote

Folks, I removed all of the erroneous responses as they were completely wrong and extremely misleading. As usual, only the post from MGIndaco is correct.

mars, you should have taken some time to search on this first, as the answer to your question has been answered many, many times before. Also, you should have challenged the reponses you were receiving, as it should have been immediately apparent on their face value that they were absolutely and completely 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 -> JCL & VSAM 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