On Wed, Oct 14, 2015 at 4:08 PM, Charles Mills <charl...@mcn.org> wrote:

> Didn't IBM bring one of those missing NUMPROC options back in COBOL 5.2 or
> am I confused?
>
> Charles
>

​This "problem" (hardware checks invalid data & terminates), to me, to
violate​ the "spirit and intent" (as my Colonel used to say) of COBOL. I do
understand the comfort of knowing that the hardware itself will not allow
you to "ADD +1 TO 'A' ". But that, to me, makes it harder on future
programmers. Instead of actually _testing_ something and giving an
understandable error message, you get a LE abend. Which must then be traced
back to the reason, an S0C7. Which must then be tracked back back to the
COBOL variable which has the bad data. And then figure out where _that_
came from. Thank God for products like AbendAid which can do most of the
drudgery. This is another reason why I like production quality RDMS
systems. If you define the column (attribute) as an integer, then it _will_
be an integer (or money or ???). You can't stick a character string into
it. (An exception to this is the SQLite data base. I love SQLite, but it
does not validate data types in any way. Dr. Hipp, the designer/programmer,
did this deliberately). Also, it makes it more problematic to upgrade, as
Lizette has found. And much harder to "port" to another architecture. Hum,
this last might be a "good" reason to not check (increases the cost and
danger of conversion, which makes it less desirable).

Case in point for the above, from the misty past. This was in the 1970s on
OS/VS1. The original programmer got to a "this cannot occur" situation.
Rather than DISPLAY .... UPON SYSOUT and call ILBOABND (I think), he (I say
he because the women programmers tended to not do this silliness) caused a
deliberate S0C7. Unfortunately, he was now gone. And we had just done a DOS
to VS1 conversion, so the other programmers didn't know how to debug it. I
ended up (just out of college) doing it, looking at the listing, and
reporting on the idiocy. This wasted about 2 hours (newbie, remember). That
firmly set my opinion of not checking for valid data.

Of course, the above is my _opinion_ and others will disagree. Hopefully we
can disagree respectfully.


-- 

Schrodinger's backup: The condition of any backup is unknown until a
restore is attempted.

Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be.

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

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