How about: 1) Check all I/O statements for correct execution (COBOL FILE STATUS). This includes OPEN and CLOSE. If the file is a VSAM file, then be sure to put the VSAM FILE STATUS in any messages in addition to the normal FILE STATUS. This can be a life saver. As an example, we had a normal FILE STATUS say something like "record too large". Programmer went crazy looking at the record. The actual problem was that the record being added was updating the keys in an AIX and there were too many base keys for the alternate key. The "record too large" was the AIX record, not the data record.
2) Check for overflow / underflow in all arithmetic operations with an ON SIZE ERROR clause. Unless, of course, you want to silently loose any high order digits. I think this will also catch division by 0 errors. 3) Verify that PIC 9 USAGE DISPLAY or PACKED-DECIMAL actually contain valid decimal information before using, unless you can be assured that they cannot be incorrect. The only way that I can think of to do this is if the data comes from somethink like DB2 which enforces correctness. -- 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