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

How can I set the Return code of a step ?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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
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

Global Moderator


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

PostPosted: Fri Sep 09, 2005 7:29 pm
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 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 Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top