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

How do i convert DB2 return code from hex


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
karthi1

New User


Joined: 07 Jul 2006
Posts: 2
Location: Bangalore

PostPosted: Fri Jul 07, 2006 10:33 am
Reply with quote

How do i convert DB2 return code from hex...
eg.
how do i convert return code 80N ?
Back to top
View user's profile Send private message
parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Fri Jul 07, 2006 3:31 pm
Reply with quote

Hi,
If my information is correct, DB2 operations returns SQL CODE ( SQLCODE OF SQLCA) in decimal formats.

However, there is a convertion possible from hexadecimal to decimal number system. Please google for conversion formula.

Thanks,
Parikshit
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Sat Jul 08, 2006 2:56 am
Reply with quote

Hi karthi1,

You are probably doing a 'DISPLAY SQLCODE' to get the 80N, right?

The 80N display in HEX is x'F8F0D5'. The 'D' is the sign indicator, in this case '-'.

Move the SQLCODE to something like WS_SQLCODE defined as PIC -999, then 'DISPLAY WS-SQLCODE'. You will get -805.

Dave
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 -> DB2

 


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 Need to convert date format DFSORT/ICETOOL 20
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
Search our Forums:

Back to Top