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: 4649
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 EXIT or RETURN cvnlynn CLIST & REXX 9 Wed Jul 19, 2017 2:50 am
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts Restart=Step not working ALAK SAHA JCL & VSAM 6 Fri Jun 30, 2017 6:28 pm
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm


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