Re: Reset data





Pete Dashwood wrote:

"Howard Brazee" <howard@xxxxxxxxxx> wrote in message news:chv5u214c3r2strckf1h2r8msh9pv42ne5@xxxxxxxxxx
(snip)
One thing I sometimes do in a program with such a table (especially if
some of the variables are packed or binary), is to create an
initialization table. If I need to reinitialize the table, I just
MOVE ZERO-TABLE to TABELLE.


Again, something I don't understand.

How would the result of doing that (taking twice as much storage as you actually need, and running the risk of forgetting to update one of the tables when the structure changes) differ from...

INITIALIZE TABELLE ?

Pete.

If you are INITIALIZE'ing a structure, the generated code will have an explicit move for each elementary field. I know it works this way in Enterprise COBOL for zOS. If you INITIALIZE the same structure in a loop many times, it can create some performance delays for certain applications. I will grant you that this kind of optimization is not typically needed in online applications, but it could be a performance bottleneck in some cases.

With kindest regards,


--
http://arnold.trembley.home.att.net/

.



Relevant Pages

  • Re: Reset data
    ... INITIALIZE TABELLE? ... The art of computer programming (now rapidly becoming a lost art, ... required to initialize it, if INITIALIZE is used. ...
    (comp.lang.cobol)
  • Re: Reset data
    ... tables when the structure changes) differ from... ... INITIALIZE TABELLE? ... explicit move for each elementary field. ... required to initialize it, if INITIALIZE is used. ...
    (comp.lang.cobol)
  • Re: Reset data
    ... tables when the structure changes) differ from... ... INITIALIZE TABELLE? ... explicit move for each elementary field. ... required to initialize it, if INITIALIZE is used. ...
    (comp.lang.cobol)