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
 

 

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 BI,TO=ZD Changing Values Tyler Dunbar DFSORT/ICETOOL 1 Tue Jul 25, 2017 12:12 am
No new posts EXIT or RETURN cvnlynn CLIST & REXX 16 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 DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm


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