> -----Original Message----- > From: IBM Mainframe Discussion List > [mailto:[EMAIL PROTECTED] On Behalf Of Tom Marchant > Sent: Thursday, December 27, 2007 2:54 PM > To: IBM-MAIN@BAMA.UA.EDU > Subject: Re: Controlling COBOL DDs named SYSOUT
<snip> > > 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. 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. However, they should be in the CEEDUMP produced by the CEE3AB2 routine. If it's good enough for IBM, it's good enough for me <grin>. -- John McKown Senior Systems Programmer HealthMarkets Keeping the Promise of Affordable Coverage Administrative Services Group Information Technology The information contained in this e-mail message may be privileged and/or confidential. It is for intended addressee(s) only. If you are not the intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication is strictly prohibited and could, in certain circumstances, be a criminal offense. If you have received this e-mail in error, please notify the sender by reply and delete this message without copying or disclosing it. ---------------------------------------------------------------------- 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