I am now in a shop that is converting from Datacom to DB2. In Datacom, they
represented everything with packed decimal. They were planning on doing the
same with DB2: Numeric (5,0) instead of Integer.
I'm looking for a persuasive argument for one approach or the other.
Currently, the main programming language used to access DB2 is Cobol, but
that will gradually shift to Java/C in the future.
Any opinions?
Rompot, Kurt wrote in message ...
IBM does support decimal data in C. For C++ IBM only provides a "Binary
Coded Decimal Class". However, all computers (PCs, UNIX, JVMs) understand
integers. Integers are also faster and take less space on disk and in
memory. I would argue in favor of using Integers rather than Numeric (5,0)
decimal data mainly because they provide the highest degree of
interoperability and portability across platforms. Of course, some data
values don't easily fit into integers and Numeric data is much better for
these types of data values.
Peter Schaeffer
281-491-4200
www.neonsys.com
"Rompot, Kurt" <ROM...@SCHNEIDER.COM> on 08/14/98 08:56:00 AM
Please respond to DB2 Data Base Discussion List <DB...@AMERICAN.EDU>
To: DB...@AMERICAN.EDU
cc: (bcc: Peter Schaeffer/Dev/Neon)
Subject: Packed Decimal vs. Integer in DB2
I am now in a shop that is converting from Datacom to DB2. In Datacom, they
represented everything with packed decimal. They were planning on doing the
same with DB2: Numeric (5,0) instead of Integer.
I'm looking for a persuasive argument for one approach or the other.
Currently, the main programming language used to access DB2 is Cobol, but
that will gradually shift to Java/C in the future.
Any opinions?
.
IBM does support decimal data in C. For C++ IBM only provides a "Binary
Coded Decimal Class". However, all computers (PCs, UNIX, JVMs) understand
integers. Integers are also faster and take less space on disk and in
memory. I would argue in favor of using Integers rather than Numeric (5,0)
decimal data mainly because they provide the highest degree of
interoperability and portability across platforms. Of course, some data
values don't easily fit into integers and Numeric data is much better for
these types of data values.
Peter Schaeffer
281-491-4200
www.neonsys.com
"Rompot, Kurt" <ROM...@SCHNEIDER.COM> on 08/14/98 08:56:00 AM
Please respond to DB2 Data Base Discussion List <DB...@AMERICAN.EDU>
To: DB...@AMERICAN.EDU
cc: (bcc: Peter Schaeffer/Dev/Neon)
Subject: Packed Decimal vs. Integer in DB2