Subject: | |
From: | |
Reply To: | |
Date: | Fri, 11 Feb 2000 15:29:28 -0600 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
I feel that Initialize is better than high level initialing moves. The
reason is the following. In the statement "MOVE SPACES TO WS-DATA-AREA."
You are telling the computer to move " " to each byte of the data area.
Even if the field is a numeric field, the command will move spaces to it.
Now later in the program you move other data to the lower level fields and
you write the data to a file, database, or whatever. There is a good
chance that the numeric fields will read "2020202020". This is what spaces
look like in a numeric field, comp field most likely.
To ensure that the data area is accurately prepared to receive data, the
initialize statement is the best choice. Each lower level field is looked
at and the proper initializing value is moved. In the case of FILLER
fields, use the VALUE IS option. Just be casefull of redefines because
fields created by the redefining of another field carry the initializing
value of the originating field.
Hope it helps
Ron Horner
Consulting Computer Specialist
http://horner.horner.home.mindspring.com
-----Original Message-----
From: David Burney [SMTP:[log in to unmask]]
Sent: Friday, February 11, 2000 12:52 PM
To: [log in to unmask]
Subject: Re: Cobol Initialize
In terms of Initialize (without the Replacing phrase) vs Move,
which is the more efficient ?
-------------------------------------------------------------------------
David Burney [log in to unmask]
Summit Racing Equipment http://www.summitracing.com
-----------
E R A C I S M
-----------
All opinions expressed herein are my own and reflect,
in no way, those of my employer.
|
|
|