by dick scherrer » Thu Oct 23, 2008 3:03 am
Hello,
This would depend on how the field(s) were to be used in the code.
Some people believe that binary numbers perform better arithmetically. Usually, it is only slightly better. Some also say binary will save space. Again, usually not so much over packed decimal. 99999 takes 3 bytes both ways. 9999999 takes 4 bytes as comp-3 and 3 bytes as binary. 999999999 takes 5 bytes as comp-3 and 4 as binary.
What many/most people do not realize is the the mainframe has machine instructions that work on packed-decimal numbers. There is also the consideration that to "edit" (commas, currency symbol, sign) the number on a screen or a report, it must be converted from binary to packed-decimal in order to show the value (the assembler EDit instruction requires packed-decimal input, so if the number is not packed-decimal, it is converted internally).
Most of the systems i've supported have standards that require data such as quantities and amounts be stored as comp-3.
Hope this helps,
d.sch.