On Tue, Aug 12, 2014 at 5:01 AM, Robert A. Rosenberg <hal9...@panix.com> wrote:
> At 20:01 -0700 on 08/11/2014, Duffy Nightingale, SS wrote about Re:
> INITILAIZE COST:
>
>> Heavy emphasis on that last sentence.   Just had a customer who didn't
>> keep track of the number of entries in his COBOL table while adding new
>> ones. Ended up adding entries way beyond the end of his table leading to
>> altering the fields following the table to wrong values leading to very
>> strange scary looking dumps that seemed to point to big problems in
>> unsupported code!  But, nope, simple, his table got bigger than the
>> definition.
>
>
> I thought the code spotted an attempt to go beyond the end of the table by
> exceeding the OCCURS value or am I thinking of PL/I which would catch this
> error?
>

COBOL _can_ do that. But you must: (1) compile with the SSRANGE
option; and (2) run with the SSRANGE turned on. Most shops avoid these
options like the plague because, at least in the past, the CPU
overhead was horrendous. IIRC, it is even worse if you use OCCURS
DEPENDING ON because the range can't be determined at compile time. It
ranks right u there with DISPLAY ... UPON CONSOLE as anathema. I also
hate programmers who leave their debugging DISPLAY ... UPON SYSOUT in
the production code. We have some programs that produce 1,000 lines of
report output and 2 million lines of debug output. "Code review!" you
say? "Too much time and effort!" is the reply. And management keeps
saying: "Who cares? The mainframe is going away soon!"

-- 
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to