HP3000-L Archives

March 1999, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mike Hornsby <[log in to unmask]>
Reply To:
Mike Hornsby <[log in to unmask]>
Date:
Fri, 12 Mar 1999 10:19:40 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (29 lines)
>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

ATOM RSS1 RSS2