Re: working storage values
- From: Richard <riplin@xxxxxxxxxxxx>
- Date: Thu, 13 Dec 2007 21:54:02 -0800 (PST)
On Dec 14, 1:11 pm, docdw...@xxxxxxxxx () wrote:
In article <6969359c-00e5-4485-9e94-2e0e0acb1...@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Richard <rip...@xxxxxxxxxxxx> wrote:
On Dec 13, 12:32 pm, docdw...@xxxxxxxxx () wrote:
Richard <rip...@xxxxxxxxxxxx> wrote:
On Dec 13, 2:47 am, yoqi99 <yoq...@xxxxxxxxx> wrote:
Have vendor started task that runs constantly while listening on port
1205. This started task has a loadlib with user written cobol
programs. This started task also has a control file (jcl ddname)
with a record. For performance reasons, I only want to read the
record one time only. How should I code the cobol program so that
the working storage values are retained between calls.
I can't statically link the vendor program with my program.....
If the vendor program CALLs your user written program and does not
CANCEL it then the Working-Storage will be retained intact between
CALLs. You only need to set a flag that indicates that the record has
already been read:
01 Already-Read PIC X VALUE "N".
01 Record-Data ...
If ( Already-Read NOT = "Y" )
MOVE "Y" TO Already-Read
do whatever with data ..
Hmmmmm... leaving aside the matter of style (any good, true, decent and
sane programmer worthy of the pittance of a salary paid for those hard-won
skills would, of course, make Already-Read an 88)
88s are soooo '60s.
... and '70s... and '80s... and onward, Good Style is Tymeless.
I suppose that if you are stuck in the past then you wouldn't notice
that the rest of the world has moved on.
I dislike 88 levels and do not use them. They would interfere with
searching for uses of particular variables.
I've never found that to be the case... but perhaps our experiences are
For example I can find where a variable is used with:
grep variable *.cbl *.pd
or by using a text editor search.
Again, our experiences may be different... I'm not familiar with
any platform where a text editor search was not available.
Of course search is available in every text editor. Grep however will
search all files specified (for example where the search is for a file
field usage) without having to bother with using an editor to open
each file. Of course the result of a grep can be piped into the
editor so that the files can be accessed directly by tapping on the
provided file names.
But regardless of how the search is done the use of 88s may mean that
multiple greps/searches are required.
With 88s I need to also know what
those names are and search for them too. I'm too lazy to be bothered
Too lazy to know what you're working on... hmmmmm... something comes to
mind about 'worthy of the pittance of a salary.
Being lazy means that I get the job done with minimum effort.
Certainly this means that the project is completed with fewer billing
In any case I tend to use modern constructs, such as 'EVALUATE
variable' and the archaic 88 style does not fit into that.
Wow... maybe someone might put together something like
... and we could have archaic and eat it, too.
Yes you could, but I dislike 'EVALUATE TRUE'.
The use of 'condition-name' not only gets in the way of finding every
place where the underlying variable is used it also dis-locates the
specific values and the resulting actions.
I am sure that you have devised techniques for overcoming this
objection, but I have avoided needing that by dealing with it in other
I read this and thought
that lo, there is nothing new under the sun.
IF EIBCALEN = 0
PERFORM 0000-HOUSEKEEPING THRU 0000-HSK-EX
PERFORM 5000-PROCESS-INPUT THRU 5000-PI-EX.
That, too, is soooo 60s.
See above about Tymelessness.
See above for not noticing what happened elsewhere.
Seeing an example like that, no wonder Cobol is dying.
Some see examples like that every working day on systems that are still
hugely profitable to the companies that run them... a curious sort of
Maybe, but the number of companies keeping such examples, and the
number that see these, are declining. You may be in an enclave of
archaicisms, but others have better ways.
- Prev by Date: Re: OT:Thanksgiving
- Next by Date: Re: working storage values
- Previous by thread: Re: working storage values
- Next by thread: Re: working storage values