On Thu, 27 Dec 2007 15:02:07 -0600, McKown, John wrote: >> -----Original Message----- >> >> What about error messages to be issued when the program terminates >> abnormally? IMO, when a program encounters an error condition that >> prevents it from continuing, a good programmer will produce a >> nice descriptive >> message. How do _you_ think that it should be written? >> >> -- >> Tom Marchant > >I generally prefer a DISPLAY ... UPON CONSOLE for critical error >messages instead of UPON SYSOUT. Why? I think that they are more likely >to be noticed.
I disagree. Even as an application programmer in the early '70s, we considered the console to be too busy to add that kind of traffic, except in the rare case that it required operator intervention. When the job is being examined after an abend, I prefer to be able to find a descriptive message in SYSOUT rather than have to search for the documentation for the program. >My own weird preference is to ABEND the program with a >documented abend code which is unique for each possible critical error >condition. I'd use the CEE3AB2 Language Environment subroutine. That >way, I can have both an abend code and a reason code. As an example, >suppose a file doesn't successfully open? I would abend with a code >which indicated which file had a problem and a reason code which was the >FILE STATUS for that operation. The only thing that I cannot get out of >this is the FILE STATUS 2 codes for VSAM, which are very useful. Nothing wrong with that, IMO. -- Tom Marchant ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

