Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Negative Value for RETURN-CODE... is it possible?

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

New User


Joined: 26 Oct 2005
Posts: 2

PostPosted: Wed Oct 26, 2005 2:24 am    Post subject: Negative Value for RETURN-CODE... is it possible?
Reply with quote

How will JCL/JES2 behave if I force the value of RETURN-CODE in COBOL to a negative number? For example, i mistakenly set it to the SQL error code like -805.

Will JCL/JES2 default it to a particular value since the range of JCL return codes is between 0 and 4095 only?

Could you provide references or links to support the answer for this?

I currently have a problem wherein I mistakenly set the RETURN-CODE register in a COBOL program to the SQL error code but my job still ends normally with RC=00 on the supposedly abending step.

I appreciate any help on this topic. Thanks!
Back to top
View user's profile Send private message

ikumar

New User


Joined: 02 Aug 2005
Posts: 81

PostPosted: Wed Oct 26, 2005 10:49 am    Post subject: Re: Negative Value for RETURN-CODE... is it possible?
Reply with quote

I am not sure whether it accepts negative return codes or not.
But i can give you one reason why it is giving RC=00 even though you have forced it to -805. Juct check, whether do u have any CALLs to subprograms after you set the retunr-code to -805. because it resets the retunr-code when the call to sub program is successful.

correct me if i m wrong....

Thanks,
Kumar.
Back to top
View user's profile Send private message
lseril

New User


Joined: 26 Oct 2005
Posts: 2

PostPosted: Wed Oct 26, 2005 11:49 am    Post subject: Re: Negative Value for RETURN-CODE... is it possible?
Reply with quote

Hi Kumar,

We do have a called program and it's passing a return code value to the calling program, will in turn will be MOVEd into the RETURN-CODE register right before ending the execution. However, we realized it's has been passing SQLCODE values which can be negative. This is easy to resolve however I'm puzzled by the way JCL/JES2 message interprets negative values.

We're quite sure that the RETURN-CODE value is -805 because we DISPLAYed it in the SYSOUT but I'm confused why JCL/JES2 changes it to RC=00.

Thanks for the response,
Leo
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 Hardcoded negative sign value in output scdinesh SYNCSORT 8 Fri Sep 08, 2017 5:28 am
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts I want to retire TRX and use only Rex... Abhinav Sharma CLIST & REXX 6 Sat Jul 29, 2017 2:53 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us