Appreciate Some "InPut"..(or feedback). 
Author Message
 Appreciate Some "InPut"..(or feedback).

Hi Folks!

I am new to the world of COBOL and am struggling to understand all the
idiosyncracies and nuances of the language (actually, I haven't even
gotten that far yet).  I am attempting to write my 4th COBOL program.  I
am using Micro Focus COBOL for Windows 3.1 (came with the text book).
Anyway this is my problem.  I am trying to get a handle on some of the
fundamentals and how to code a bit more efficiently.  In an attempt to
do just that, I came across this handy dandy little COBOL Verb,
INITIALIZE.  When I mentioned it to my instructor, his discussion on the
verb left me somewhat fuzzy.  He had indicated that this verb "may use
up more resources than the normal initial MOVE statements that are used
to place actual initial values of either zero or spaces into the
recieving field variables."  (What a mouthful)   He added several
warnings about how careful one must be when using this VERB.  I have
been reading this group for about two weeks now and I am very e{*filter*}d
about the minds I have been allowed to glimpse.   I would love to throw
this up in the air for a little friendly babble.  Thanks for any
responses and to all that take the time to respond.

DD



Mon, 21 May 2001 03:00:00 GMT  
 Appreciate Some "InPut"..(or feedback).

Quote:

>Hi Folks!
>I am new to the world of COBOL and am struggling to understand all the
>idiosyncracies and nuances of the language (actually, I haven't even
>gotten that far yet.  I am trying to get a handle on some of the
>fundamentals and how to code a bit more efficiently.

at your level efficiency is not your main concern. Later on it
may or may not (the most common) be important.

Quote:
>  In an attempt to
>do just that, I came across this handy dandy little COBOL Verb,
>INITIALIZE.  When I mentioned it to my instructor, his discussion on the
>verb left me somewhat fuzzy.  He had indicated that this verb "may use
>up more resources than the normal initial MOVE statements that are used
>to place actual initial values of either zero or spaces into the
>recieving field variables."  (What a mouthful)   He added several

INITIALZIZE is fine; there are some (pathological) caes where
you have to be a bit careful, but again at your level, there is
nothing wrong with INITIALIZE as such; one might argue that
maybe you don't *need* to initialize (or move to) all the time,
but that is different matter.
Quote:
>warnings about how careful one must be when using this VERB.  I have
>been reading this group for about two weeks now and I am very e{*filter*}d
>about the minds I have been allowed to glimpse.   I would love to throw
>this up in the air for a little friendly babble.  Thanks for any
>responses and to all that take the time to respond.



Mon, 21 May 2001 03:00:00 GMT  
 Appreciate Some "InPut"..(or feedback).

Quote:

>Hi Folks!

>I am new to the world of COBOL and am struggling to understand all the
>idiosyncracies and nuances of the language (actually, I haven't even
>gotten that far yet).  I am attempting to write my 4th COBOL program.  I
>am using Micro Focus COBOL for Windows 3.1 (came with the text book).
>Anyway this is my problem.  I am trying to get a handle on some of the
>fundamentals and how to code a bit more efficiently.  In an attempt to
>do just that, I came across this handy dandy little COBOL Verb,
>INITIALIZE.  When I mentioned it to my instructor, his discussion on the
>verb left me somewhat fuzzy.  He had indicated that this verb "may use
>up more resources than the normal initial MOVE statements that are used
>to place actual initial values of either zero or spaces into the
>recieving field variables."  (What a mouthful)   He added several
>warnings about how careful one must be when using this VERB.  I have
>been reading this group for about two weeks now and I am very e{*filter*}d
>about the minds I have been allowed to glimpse.   I would love to throw
>this up in the air for a little friendly babble.  Thanks for any
>responses and to all that take the time to respond.

>DD

Mr. Danticd:

Although I try to avoid getting emotional about the INIT verb, I must
politely request that you modify your signature line before we feel
the wrath of Sploingy, the Divinity of the Stilettos.

There can only be one DD in the comp.lang.cobol newsgroup and that is
Doc Dwarf, a.k.a. "Goobers."

If you wish to reverse the two letters in order to make it a bit
different, that will be just fine!

;-)

Bob Wolfe, flexus
Check out The Flexus COBOL Page at http://www.*-*-*.com/



Mon, 21 May 2001 03:00:00 GMT  
 Appreciate Some "InPut"..(or feedback).

Quote:
> Hi Folks!

> I am new to the world of COBOL and am struggling to understand all the
> idiosyncracies and nuances of the language (actually, I haven't even
> gotten that far yet).  I am attempting to write my 4th COBOL program.  I
> am using Micro Focus COBOL for Windows 3.1 (came with the text book).
> Anyway this is my problem.  I am trying to get a handle on some of the
> fundamentals and how to code a bit more efficiently.  In an attempt to
> do just that, I came across this handy dandy little COBOL Verb,
> INITIALIZE.  When I mentioned it to my instructor, his discussion on the
> verb left me somewhat fuzzy.  He had indicated that this verb "may use
> up more resources than the normal initial MOVE statements that are used
> to place actual initial values of either zero or spaces into the
> recieving field variables."  (What a mouthful)   He added several
> warnings about how careful one must be when using this VERB.  I have
> been reading this group for about two weeks now and I am very e{*filter*}d
> about the minds I have been allowed to glimpse.   I would love to throw
> this up in the air for a little friendly babble.  Thanks for any
> responses and to all that take the time to respond.

> DD

First I would change your signature, another estimated member of this
group already makes use of it. <g>

Ok let's get down to business. Assuming your instructor is correct about
the the extra resources that "may" be used with the INITIALIZE verb I
think any possible increase is far less than the cost in human resources.

While I know machine resources need to be considered in this situation I
think it is not worth the time to figure out the additional machine
overhead vs the human cost.

For example, if you change a record layout and add a new field using his
method you would have to make sure to include an additional MOVE to make
sure it is initialized properly. By using the INITIALIZE correctly that
would almost never be an issue. I say almost never because I feel that
any thing can happen and I don't like using the term "never".

In the long run using the INITIALIZE verb will make your life a lot
easier and your code will be a lot easier to maintain for yourself and
the pour slob who gets to maintain it in the future.

Just my 2 cents.<g>

--
Jeff Farkas

Home Page:
http://www.*-*-*.com/ ~jeffreyfarkas/



Mon, 21 May 2001 03:00:00 GMT  
 Appreciate Some "InPut"..(or feedback).


Quote:

> > Hi Folks!

> > I am new to the world of COBOL and am struggling to understand all the
> > idiosyncracies and nuances of the language (actually, I haven't even
> > gotten that far yet).  I am attempting to write my 4th COBOL program.  I
> > am using Micro Focus COBOL for Windows 3.1 (came with the text book).
> > Anyway this is my problem.  I am trying to get a handle on some of the
> > fundamentals and how to code a bit more efficiently.  In an attempt to
> > do just that, I came across this handy dandy little COBOL Verb,
> > INITIALIZE.  When I mentioned it to my instructor, his discussion on the
> > verb left me somewhat fuzzy.  He had indicated that this verb "may use
> > up more resources than the normal initial MOVE statements that are used
> > to place actual initial values of either zero or spaces into the
> > recieving field variables."  (What a mouthful)   He added several
> > warnings about how careful one must be when using this VERB.  I have
> > been reading this group for about two weeks now and I am very e{*filter*}d
> > about the minds I have been allowed to glimpse.   I would love to throw
> > this up in the air for a little friendly babble.  Thanks for any
> > responses and to all that take the time to respond.

> > DD

> First I would change your signature, another (estimated SB esteemed) member of this
> group already makes use of it. <g>

> Ok let's get down to business. Assuming your instructor is correct about
> the the extra resources that "may" be used with the INITIALIZE verb I
> think any possible increase is far less than the cost in human resources.

> While I know machine resources need to be considered in this situation I
> think it is not worth the time to figure out the additional machine
> overhead vs the human cost.

> For example, if you change a record layout and add a new field using his
> method you would have to make sure to include an additional MOVE to make
> sure it is initialized properly. By using the INITIALIZE correctly that
> would almost never be an issue. I say almost never because I feel that
> any thing can happen and I don't like using the term "never".

> In the long run using the INITIALIZE verb will make your life a lot
> easier and your code will be a lot easier to maintain for yourself and
> the pour slob who gets to maintain it in the future.

> Just my 2 cents.<g>

--
Jeff Farkas



Mon, 21 May 2001 03:00:00 GMT  
 Appreciate Some "InPut"..(or feedback).
I not only agree with Jeff, but would add a point: you generally
only initialise data once.  Even if the initialise verb *does* take
a bit longer (and I doubt it does, frankly), unless you are in the
main loop, the extra time is almost irrelevant. A couple of
milliseconds here and there only count if you are repeating
something a few million times.
Quote:


>> Hi Folks!

>> I am new to the world of COBOL and am struggling to understand all the
>> idiosyncracies and nuances of the language (actually, I haven't even
>> gotten that far yet).  I am attempting to write my 4th COBOL program.  I
>> am using Micro Focus COBOL for Windows 3.1 (came with the text book).
>> Anyway this is my problem.  I am trying to get a handle on some of the
>> fundamentals and how to code a bit more efficiently.  In an attempt to
>> do just that, I came across this handy dandy little COBOL Verb,
>> INITIALIZE.  When I mentioned it to my instructor, his discussion on the
>> verb left me somewhat fuzzy.  He had indicated that this verb "may use
>> up more resources than the normal initial MOVE statements that are used
>> to place actual initial values of either zero or spaces into the
>> recieving field variables."  (What a mouthful)   He added several
>> warnings about how careful one must be when using this VERB.  I have
>> been reading this group for about two weeks now and I am very e{*filter*}d
>> about the minds I have been allowed to glimpse.   I would love to throw
>> this up in the air for a little friendly babble.  Thanks for any
>> responses and to all that take the time to respond.

>> DD

>First I would change your signature, another estimated member of this
>group already makes use of it. <g>

>Ok let's get down to business. Assuming your instructor is correct about
>the the extra resources that "may" be used with the INITIALIZE verb I
>think any possible increase is far less than the cost in human resources.

>While I know machine resources need to be considered in this situation I
>think it is not worth the time to figure out the additional machine
>overhead vs the human cost.

>For example, if you change a record layout and add a new field using his
>method you would have to make sure to include an additional MOVE to make
>sure it is initialized properly. By using the INITIALIZE correctly that
>would almost never be an issue. I say almost never because I feel that
>any thing can happen and I don't like using the term "never".

>In the long run using the INITIALIZE verb will make your life a lot
>easier and your code will be a lot easier to maintain for yourself and
>the pour slob who gets to maintain it in the future.

>Just my 2 cents.<g>

>--
>Jeff Farkas

>Home Page:
> http://www.*-*-*.com/ ~jeffreyfarkas/



Mon, 21 May 2001 03:00:00 GMT  
 Appreciate Some "InPut"..(or feedback).

Quote:

>Hi Folks!

>I am new to the world of COBOL and am struggling to understand all the
>idiosyncracies and nuances of the language (actually, I haven't even
>gotten that far yet).  I am attempting to write my 4th COBOL program.  I
>am using Micro Focus COBOL for Windows 3.1 (came with the text book).
>Anyway this is my problem.  I am trying to get a handle on some of the
>fundamentals and how to code a bit more efficiently.  In an attempt to
>do just that, I came across this handy dandy little COBOL Verb,
>INITIALIZE.  When I mentioned it to my instructor, his discussion on the
>verb left me somewhat fuzzy.  He had indicated that this verb "may use
>up more resources than the normal initial MOVE statements that are used
>to place actual initial values of either zero or spaces into the
>recieving field variables."  (What a mouthful)   He added several
>warnings about how careful one must be when using this VERB.

The overhead involved in using INITIALIZE, in comparison to hand-coding
moves to all the various fields that must have initial values set, is
_negligible_ when viewed in the light of all the bloated apps now filling up
our hardware capacity.  The instructor must have learned his concept of
efficiency in the early days of very expensive core memory and rotating
magnetic storage media (that's what they called memory and disk in olden
days.)  IMHO, the INITIALIZE verb saves a lot of busywork otherwise expended
in coding MOVEs to load initial values.

- Show quoted text -

Quote:
> I have
>been reading this group for about two weeks now and I am very e{*filter*}d
>about the minds I have been allowed to glimpse.   I would love to throw
>this up in the air for a little friendly babble.  Thanks for any
>responses and to all that take the time to respond.

>DD



Mon, 21 May 2001 03:00:00 GMT  
 Appreciate Some "InPut"..(or feedback).

Quote:


> >DD

> Mr. Danticd:

> Although I try to avoid getting emotional about the INIT verb, I must
> politely request that you modify your signature line before we feel
> the wrath of Sploingy, the Divinity of the Stilettos.

> There can only be one DD in the comp.lang.cobol newsgroup and that is
> Doc Dwarf, a.k.a. "Goobers."

> If you wish to reverse the two letters in order to make it a bit
> different, that will be just fine!

> ;-)

> Bob Wolfe, flexus
> Check out The Flexus COBOL Page at http://www.*-*-*.com/


"INITIALIZE".  But "her" most glaring syntax error to date had to be the use
of the letters "DD".   I  sincerely apologize for any toes that may have been
{*filter*}led upon.  This was not my intention.  I admit, I had encountered the
sig while reading the NG posts this last week.  What can I say?  Old habits
die hard?  I will be more cautious in the future.  How would "The Group" feel
about a modification with a slight compromise?  Such as the one below?  I'll
be anxiously awaiting your approval.  :)  Please do let the babble continue
on the other issue though....

DD a.k.a. N2wishIN



Mon, 21 May 2001 03:00:00 GMT  
 Appreciate Some "InPut"..(or feedback).

Quote:

>Iinitialize is wonderfule, as is a local-storage section. :)
>However, non IBM compilers often implement them in wierd
>and disgusting ways. For example, AcuCOBOL 3.x implements it,
>but it doesn't work.

>Check the compiler you are using and if it it is implemented,
>test it. If it works, use it. (Caveat: make damn sure your
>compiler is supported!)

>I disagree with a lot of folks around here in that I will
>always trade off efficiency for maintainability; you can always
>add hardware. :)

>-Paul

>P.S. - I just found out today that a large chunk of my email
>has been lost for the past couple months; if anyone here is waiting
>on a replyh from me, please resend. (*sigh*) I guess I learned a
>lesson - never depend upon a former employer to forward your mail
>to you!

The former employer is probably going on efficiency (savings from not
forwarding mail) rather than maintainability (sending everything to it's
"proper" place :-)

- Show quoted text -

Quote:
>-Paul


>: Hi Folks!

>: I am new to the world of COBOL and am struggling to understand all the
>: idiosyncracies and nuances of the language (actually, I haven't even
>: gotten that far yet).  I am attempting to write my 4th COBOL program.  I
>: am using Micro Focus COBOL for Windows 3.1 (came with the text book).
>: Anyway this is my problem.  I am trying to get a handle on some of the
>: fundamentals and how to code a bit more efficiently.  In an attempt to
>: do just that, I came across this handy dandy little COBOL Verb,
>: INITIALIZE.  When I mentioned it to my instructor, his discussion on the
>: verb left me somewhat fuzzy.  He had indicated that this verb "may use
>: up more resources than the normal initial MOVE statements that are used
>: to place actual initial values of either zero or spaces into the
>: recieving field variables."  (What a mouthful)   He added several
>: warnings about how careful one must be when using this VERB.  I have
>: been reading this group for about two weeks now and I am very e{*filter*}d
>: about the minds I have been allowed to glimpse.   I would love to throw
>: this up in the air for a little friendly babble.  Thanks for any
>: responses and to all that take the time to respond.

>: DD



Mon, 21 May 2001 03:00:00 GMT  
 Appreciate Some "InPut"..(or feedback).

Quote:

> Hi Folks!

> INITIALIZE.  When I mentioned it to my instructor, his discussion on the
> verb left me somewhat fuzzy.  He had indicated that this verb "may use
> up more resources than the normal initial MOVE statements that are used
> to place actual initial values of either zero or spaces into the
> recieving field variables."  

Lookout - I'm going to plug my book.

Sams Teach Yourself COBOL in 24 Hours by yours truly is now available.
 If it's not in your local bookstore yet - it will be soon.

I have a discussion of Initialize in the book, when to use it and what
to watch out for.

In readers digest version:  Some compilers DO suffer from poor
performance when  using Initialize, but most modern compilers have
overcome this issue.

One MISUNDERSTANDING about initialize that is common is the idea that
when you have a VALUE clause specified for a data item, Initialize
does NOT replace the field with the VALUE specified.

However, that said - you can TARGET INITIALZE to specific data types,
and you can even use it to replace field contents with other than
zeros or spaces.



Tue, 22 May 2001 03:00:00 GMT  
 Appreciate Some "InPut"..(or feedback).

Iinitialize is wonderfule, as is a local-storage section. :)
However, non IBM compilers often implement them in wierd
and disgusting ways. For example, AcuCOBOL 3.x implements it,
but it doesn't work.

Check the compiler you are using and if it it is implemented,
test it. If it works, use it. (Caveat: make damn sure your
compiler is supported!)

I disagree with a lot of folks around here in that I will
always trade off efficiency for maintainability; you can always
add hardware. :)

-Paul

P.S. - I just found out today that a large chunk of my email
has been lost for the past couple months; if anyone here is waiting
on a replyh from me, please resend. (*sigh*) I guess I learned a
lesson - never depend upon a former employer to forward your mail
to you!

-Paul

: Hi Folks!

: I am new to the world of COBOL and am struggling to understand all the
: idiosyncracies and nuances of the language (actually, I haven't even
: gotten that far yet).  I am attempting to write my 4th COBOL program.  I
: am using Micro Focus COBOL for Windows 3.1 (came with the text book).
: Anyway this is my problem.  I am trying to get a handle on some of the
: fundamentals and how to code a bit more efficiently.  In an attempt to
: do just that, I came across this handy dandy little COBOL Verb,
: INITIALIZE.  When I mentioned it to my instructor, his discussion on the
: verb left me somewhat fuzzy.  He had indicated that this verb "may use
: up more resources than the normal initial MOVE statements that are used
: to place actual initial values of either zero or spaces into the
: recieving field variables."  (What a mouthful)   He added several
: warnings about how careful one must be when using this VERB.  I have
: been reading this group for about two weeks now and I am very e{*filter*}d
: about the minds I have been allowed to glimpse.   I would love to throw
: this up in the air for a little friendly babble.  Thanks for any
: responses and to all that take the time to respond.

: DD



Tue, 22 May 2001 03:00:00 GMT  
 Appreciate Some "InPut"..(or feedback).

Quote:



>> >DD

>> Mr. Danticd:

>> Although I try to avoid getting emotional about the INIT verb, I must
>> politely request that you modify your signature line before we feel
>> the wrath of Sploingy, the Divinity of the Stilettos.

>> There can only be one DD in the comp.lang.cobol newsgroup and that is
>> Doc Dwarf, a.k.a. "Goobers."

>> If you wish to reverse the two letters in order to make it a bit
>> different, that will be just fine!

>> ;-)

>> Bob Wolfe, flexus
>> Check out The Flexus COBOL Page at http://www.*-*-*.com/


>"INITIALIZE".  But "her" most glaring syntax error to date had to be the
use
>of the letters "DD".   I  sincerely apologize for any toes that may have
been
>{*filter*}led upon.  This was not my intention.  I admit, I had encountered the
>sig while reading the NG posts this last week.  What can I say?  Old habits
>die hard?  I will be more cautious in the future.  How would "The Group"
feel
>about a modification with a slight compromise?  Such as the one below?
I'll
>be anxiously awaiting your approval.  :)  Please do let the babble continue
>on the other issue though....

>DD a.k.a. N2wishIN

How about "her" using DudderDD?

- Show quoted text -



Tue, 22 May 2001 03:00:00 GMT  
 Appreciate Some "InPut"..(or feedback).

Quote:

> Hi Folks!

> I am new to the world of COBOL and am struggling to understand all the
> idiosyncracies and nuances of the language

Just for openers, forget doing what you wrote above. Just browse through
the NG and look at the looong threads we generate on GOTO, EVALUATE vs.
IF..ELSE..IF..ELSE..., etc. People who've been coding COBOL
professionally 20 years and more don't understand "all the
idiosyncrasies and nuances of the language". Concentrate on learning how
to make things work.

Your professor's reply concerning the INITIALIZE verb is a standard one;
however, I haven't observed any problems in practice and we use it a
lot. Make sure you understand the limitations of INITIALIZE; for
openers, it doesn't do FILLER.

Bill {*filter*}



Tue, 22 May 2001 03:00:00 GMT  
 Appreciate Some "InPut"..(or feedback).
(snip)

Quote:
> INITIALZIZE is fine; there are some (pathological) caes where
> you have to be a bit careful, but again at your level, there is
> nothing wrong with INITIALIZE as such; one might argue that
> maybe you don't *need* to initialize (or move to) all the time,
> but that is different matter.

Very good point from Leif; let me just toss in an example, don't
INITIALIZE areas which are used for input files. It's also not
necessary, as a rule, to INITIALIZE (or to specify VALUEs) on save areas
into which you always move something before you try to use it for
anything else.

Bill {*filter*}



Tue, 22 May 2001 03:00:00 GMT  
 Appreciate Some "InPut"..(or feedback).
'Twas Thu, 3 Dec 1998 19:07:27 -0500, when "Dennis J. Minette"

Quote:
>The overhead involved in using INITIALIZE, in comparison to hand-coding
>moves to all the various fields that must have initial values set, is
>_negligible_ when viewed in the light of all the bloated apps now filling up
>our hardware capacity.  The instructor must have learned his concept of
>efficiency in the early days of very expensive core memory and rotating
>magnetic storage media (that's what they called memory and disk in olden
>days.)  IMHO, the INITIALIZE verb saves a lot of busywork otherwise expended
>in coding MOVEs to load initial values.

As a general rule, writing something declaratively (ie, in the DATA
DIVISION) is less errorprone than writing it procedurally (in the
PROCEDURE DIVISION).

--
R B |\  Randall Bart

n r |\  1-310-542-6013      Please reply without spam       I Love You
d t ||\ Greatest Unisys A Series Programmer Available is Now Available
a    |/                 http://members.aol.com/PanicYr00/RBResume.html
l    |\ The Year 2000 Bugs:           http://members.aol.com/PanicYr00
l    |/ MS^7=6/28/107   http://members.aol.com/PanicYr00/Sequence.html



Tue, 22 May 2001 03:00:00 GMT  
 
 [ 33 post ]  Go to page: [1] [2] [3]

 Relevant Pages 

1. "button invoke" gives no visible feedback

2. string.join(["Tk 4.2p2", "Python 1.4", "Win32", "free"], "for")

3. Vendor "input" to the COBOL newsgroups

4. Immediate Character Input with "text_io.get"

5. Immediate Character Input with "text_io.get"

6. extract multiple "Bit Rate" from input

7. entry input "anchor".

8. input widget "index end" quirk

9. exec rsh problem: "Stopped (tty input)"

10. BEGIN{want[]={"s1o", "s2o", "s2q", "s3q"}

11. Parsing ""D""?

12. "Fifth", "Forth", zai nar?

 

 
Powered by phpBB® Forum Software