× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
.
.
Greg.

Packed decimal format will always use a whole number of bytes.  Each byte
can hold two digits, but the last byte can hold only one digit and a sign.
 Therefore, you can always round up your numeric fields to odd lengths
without using more space.

If the CPU has to work more with even definitions, I do'nt know(???)


Mvh.

Geir Kildal






Greg Spohr <GSpohr@DOTFOODS.com>
Sent by: cobol400-l-admin@midrange.com
08.10.2002 15:30
Please respond to cobol400-l


        To:     "'cobol400-l@midrange.com'" <cobol400-l@midrange.com>
        cc:
        Fax to:
        Subject:        Internal handling of numeric data in Cobol


        I have recently been told that    "COBOL programs run more
efficiently when numeric fields are defined as odd length.  The COBOL
compiler generates more machine instructions to manipulate an even length
numeric field than an odd length numeric field.  COBOL uses packed decimal
internally for handling data.  Before a COBOL program can manipulate or
use
an even length numeric field, it has to run a series of machine
instructions
to add an extra byte to the field.  This is a waste of CPU time, causes
the
program to run slower, and creates a larger program in size."
        Can anyone confirm or dispute this for me?  We are creating a
reference file and the answer to this question will determine how we
define
our numeric fields.

Thanks,

Greg Spohr
Business Systems Development Manager
Dot Foods, Inc.
Route 99 South, Mt. Sterling, IL   62353
(217) 773-4411 ext. 2651
Fax: (217) 773-2249
gspohr@dotfoods.com
www.dotfoods.com

_______________________________________________
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing
list
To post a message email: COBOL400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/cobol400-l
or email: COBOL400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.