John McKown writes

<begin extract>
Why not fix your processing program to not abend? In COBOL, try
verifying the record data before processing it. Perhaps a IF NOT
NUMERIC type test.
<end extract>

and it would be impossible to disagree with the substance of this
recommendation.

There are, however, two very different ways to accomplish this objective.

One can, as John suggests, scrub the input data before they are processed.

Alternatively, one can arrange to handle input-data errors only if and
as they occur.  Interrupt-driven condition handling of this sort, long
possible in PL/I, is now possible in COBOL too.

The rationale for this second approach if of course that most input
data are not incorrect.  Some are, and they must be detected and
corrected or set aside; but it is more efficient, very much more
efficient,  to deal only with bad input data than to test all of them.

John Gilmore, Ashland, MA 01721 - USA

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to