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
 
How do i convert DB2 return code from hex

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: How do i convert DB2 return code from hex
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    Post subject:
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    Post subject: Re: Converting DB2 return code
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What will happen if we dont code STOP... Poha Eater COBOL Programming 4 Mon Jun 04, 2018 5:27 pm
No new posts JCL to set Return code when Time Out ... vinu78 JCL & VSAM 6 Wed May 30, 2018 11:27 am
This topic is locked: you cannot edit posts or make replies. Rexx code to find greater then symobl... Bharath Vikraman CLIST & REXX 8 Tue May 29, 2018 9:40 am
No new posts RESP2 code -502 pshongal CICS 6 Mon May 28, 2018 10:58 am
No new posts How to convert 2 bytes into single by... pkmurali DB2 6 Fri May 25, 2018 1:41 pm

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