I am looking at the possiblity of reading a db2 table for a financial app
using cobol, can I go above the PIC S9(19) COMP as I need to handle large
precision numbers (up to 31 digit).
The data would be stored as decimal in db2, i believe there is a compiler
option but cant find it in my documenetation
Any help greatly recieved
Ed
Depends on the compiler. In general, yes.
A thirty-one digit number is more than 10 million times the number of
electrons in the universe - just what is it you are measuring?
Oh, wait. I see the Google results for "btinternet + spam" yields over
344,000 hits. Never mind on the question, I think I know the answer.
Don't know for sure on your platform.
Check out the ARITH compiler option if you have it.
The Compiler Limits in your manuals might have the information.
Programmer "beware" !!!
--
Bill Klein
wmklein <at> ix.netcom.com
"Harley" <dennis.ha...@worldnet.att.net> wrote in message
news:lpmxb.341861$0v4.18...@bgtnsc04-news.ops.worldnet.att.net...
The old IBM 1401, circa late 50's, could do 'unlimited precision'. Fields
were delimited by 'word marks', there were no field lengths in the
instruction format. The Burroughs/Unisys Medium Systems hardware
could handle an integer or floating point mantissa up to 100 digits, and
a multiply could result in a 200 digit product. IOW, it could calculate
(goggle - 1)**2, or the size of the universe in cubic microns, exactly
(well, assuming the size of the universe in cubic microns is an integer,
or a real number with only a few decimal places :-).
--
Judson McClendon ju...@sunvaley0.com (remove zero)
Sun Valley Systems http://sunvaley.com
"For God so loved the world that He gave His only begotten Son, that
whoever believes in Him should not perish but have everlasting life."
I haven't checked yet, but I would assume that the overhead is encountered
only on the fields that require the Extended instructions. (I hope this is
the case, and I'll check next week).
From my experience, the Extended situation comes into play when there are
columns on DB2 tables that exceed the normal limit.
The other option is to return a truncated number from DB2, and hope you
don't drop anything.