HP3000-L Archives

February 2000, 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:
Ron Horner <[log in to unmask]>
Reply To:
Date:
Fri, 11 Feb 2000 15:29:28 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (41 lines)
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.

ATOM RSS1 RSS2