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
 
can Return-code have odd-number values?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
DB2 Guy

New User


Joined: 28 Oct 2008
Posts: 98
Location: Cubicle

PostPosted: Thu Jul 16, 2009 11:48 pm    Post subject: can Return-code have odd-number values?
Reply with quote

Usually, we deal with RC=0,4,8 or 16 -- all of them are even-numbers, is there any operation on MVS (specifially some error condition in COBOL or DB2 functioing) in which one can get odd-number value for RC?

My question may sound stupid, but I could not get a good link or answer for this. I searched in google but,probably, I'm not searching in the right direction..can some one please assit?
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jul 17, 2009 12:00 am    Post subject:
Reply with quote

Hello,

Your code can generate an rc of anything between 0 and 4095. It is really easy to try, so you might want to run a couple of experiments. I carry around a little program that accepts a parm and sets the rc to the parm value (so many rc's can be tested without needing to change the code to generate various values).

The 0, 4, 8, etc are ones that have been used by IBM modules for many, many years. They consistently represent different levels of severity.

Several sites i've supported have a standard that any application code that issues an rc must use a number greater than 100 (or 1000 some places) so there will be no confusion that the rc was application generated rather than utility generated.
Back to top
View user's profile Send private message
DB2 Guy

New User


Joined: 28 Oct 2008
Posts: 98
Location: Cubicle

PostPosted: Fri Jul 17, 2009 12:27 am    Post subject:
Reply with quote

Hello Dick,

Thanks for your reply.

I would say, instead of generating a desired value of an RC, "getting" a value of RC is my concern. Apologies, I did not calrify it well in previous post. (probably I did not how to constuct my question well in a single shot... icon_smile.gif)

Say, I'm working on a Store Procedure (SP) and a query runs well on some execution of SP -- I'll get RC=0 though I can SET/MOVE some user defined value as well. Here I would like to ask, can there be any situation, in such an application where for some operation, any default value of RC wil be =9? I understand RC can have value from 0 to 4095 so 9 is a possible value but unless we set RC=9 it's not populated as 9, right? Can there be some (default) codition which will yield RC=9, or any other odd value for RC? Or is totally user dependent what value s/he wants to set for RC?

Probably I could put my question well.. icon_neutral.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jul 17, 2009 1:52 am    Post subject:
Reply with quote

Hello,

Quote:
Or is totally user dependent what value
Whoever wrote the code determines the rc. Hopefully, there was some standard list of valid rc's and their meaning. If not, all of the code that is part of the run-unit will have to be checked to see why some particular value was set.
Back to top
View user's profile Send private message
DB2 Guy

New User


Joined: 28 Oct 2008
Posts: 98
Location: Cubicle

PostPosted: Fri Jul 17, 2009 9:56 pm    Post subject:
Reply with quote

Thanks Dick -- that helps.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jul 17, 2009 10:01 pm    Post subject: Reply to: can Return-code have odd-number values?
Reply with quote

You're welcome - good luck icon_smile.gif

d
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Getting GG return code abdulrafi IMS DB/DC 2 Tue Apr 10, 2018 12:31 pm
No new posts LOW VALUES as a KEY juares castro DB2 10 Sat Apr 07, 2018 1:06 am
No new posts Repeat Sequence Number Until change i... rahulabvp DFSORT/ICETOOL 6 Thu Mar 29, 2018 12:51 pm
No new posts Query to compare 2 values of 1 column... Poha Eater DB2 13 Fri Mar 09, 2018 10:45 am
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm

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