Subject: | |
From: | |
Reply To: | |
Date: | Fri, 12 Mar 1999 10:19:40 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
>Is this true???
>
> Don't use PIC 9 fields in COBOL for arithmetic operations. The
>overhead for ASCII to binary is substantial.
>If it is, what should we use?
Thanks Ron, this could be clearer.
The usage parameter or field internal storage is defined as follows:
PACKED-DECIMAL COMPUTATIONAL-3, andCOMP-3, specify packed-decimal format
The words COMPUTATIONAL-3 and COMP-3 are an HP extensions.
BINARY,COMPUTATIONAL, COMP, specify two's complement binary integer format.
DISPLAY, is default, specifies ASCII character format.
When I first learned how to use the MPE/XL debugger we used a little COBOL
prime number program to run with ,DEBUG. It was quite interesting to see the
differences in the amount of instructions generated when the field
definitions were changed from PIC 9 to PIC 9 COMP! It was also interesting
to see the amount of code generated to deal with intermediate results of
unlike filed definitions and sizes.
Hope this clarifies, thanks again!
TGIF
Mike
|
|
|