Page 1 of 1

Where to find program error handling "standards"?

Posted: Sat Oct 23, 2021 7:28 pm
by nidhir
Hi,

My simple question is Where to find program error handling "standards"?

There are many I am sure where we have an application programmer not properly handling error processing. Specially areas where you need to display the error codes properly to solve an abend., for example COBOL error, code, sqlcode etc..
Is there a manual section has the error handling process somewhere? Any guidance is appreciated.

Re: Where to find program error handling "standards"?

Posted: Wed Oct 27, 2021 12:35 am
by Robert Sample
I've not run across any error handling standards, per se, in my 40+ years of programming. There are so many variables involved (SQL, DB2, COBOL, JCL, VSAM, sequential data sets just to name a few) that any attempt to define standards would pretty much fail quickly. Any attempt to define standards has to consider the application since something that should be fatal in one application may be a warning in a different application and not even recognized as an issue in a third application.

For example, with COBOL there are file status codes and extended file status codes for VSAM. Both should certainly be used as a standard but programs run all over the world every day that use no file status codes at all. And those programs are not "wrong" as they are producing correct results for their applications.

Re: Where to find program error handling "standards"?

Posted: Wed Oct 27, 2021 3:00 pm
by nidhir
That is correct Robert. But if I try to create one for my company, would you like to suggest a starting point as a reference?

Re: Where to find program error handling "standards"?

Posted: Thu Oct 28, 2021 12:34 am
by Robert Sample
I'm not sure you've described a very useful project, but if the company is paying for it ....

Your starting point should be to narrow down the scope of what you want to achieve. It is impossible to have program error handling standards for everything. Pick something to start with (for example, COBOL) and start putting together common errors and how they should be handled. I've always told my application programmers, for example, that a S0C7 data error is actually a programmer error since it is possible to code COBOL programs so that they never have a S0C7. Few programmers do this, but it is possible.