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

generated Identity-PK: BIGINT or DECIMAL(18)


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

New User


Joined: 11 Jan 2006
Posts: 83
Location: Lower Saxony (DE)

PostPosted: Mon Jan 28, 2013 5:24 pm
Reply with quote

The tables for which I am responsible are defined with a generated identity-pk and most of them in Decimal(18) format.
What would you recommend, is better to use?
I suppose BigInt is similar to COBOL-Binary and Decimal is similar to COBOL-Display?
Than I guess BigInt requires much less storage space in table- and in indexspace as well.
Furthermore, I suspect that it's faster to compute new BigInt- than Decimal identities - similar to COBOL - because decimal values need to be converted in binary format.
Am I right? Do you agree with that?
Thanks a lot for your help
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Jan 28, 2013 5:35 pm
Reply with quote

You need to know whether DECIMAL would be "internal" (packed) or "external" (zoned).

Why do you believe that Cobol would change decimals to binary to do arithmetic? There are specific decimal-arithmetic machine instructions.

An 18-digit binary is enormously far from "faster" compared to an 18-digit packed-decimal, which I'd avoid using anyway, if possible, as 17 digits are "faster".
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Need Help with Packed Decimal Signs DFSORT/ICETOOL 4
No new posts Select a DB2 value in a specific deci... DB2 4
No new posts String has hex character need to conv... COBOL Programming 3
No new posts How to display the leading zeros of a... DB2 7
Search our Forums:

Back to Top