There was a difference in the IBM Cobol and the ANS Cobol, I think it was 85 standards. IBM Cobol allow for the abbreviated IF, ANS did not. For IBM to be ANS compliant with the standard the IF was changed.
Regards, Herman Stocker -----Original Message----- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Greg Shirey Sent: Monday, October 13, 2008 10:51 AM To: [email protected] Subject: COBOL abbreviated IF & message IGYPS2048-S Hello all, I'd appreciate some help interpreting COBOL. A programmer was updating a program which contained the following: IF WC-FUNC (SUB) = ("X" OR "Z") AND (WC-AMTUSE (SUB) + WC-AMT-PENDING (SUB)) < 0 GO TO G100-FIND-CREDIT-X. and the compiler spit out: IGYPS2048-S An invalid abbreviated relation condition was found. The statement was discarded. The programmer's first issue was that this program compiled "clean" back in 2006. Our research discovered APAR PK27765 which says: "The Enterprise COBOL compiler did not correctly diagnose an incorrect IF statement." and "The Enterprise COBOL is changed to correctly diagnose an abbreviated IF statement missing a required logical operator with message IGYPS2048-S." The date on this APAR was late 2006. My interpretation is that the COBOL IF statement was incorrect in 2006, but the compiler did not correctly flag it, and that error has now been fixed. The programmer's second issue became - so what's wrong with the IF statement anyway? I'm kind of stuck on that one. I'd appreciate any feedback. Regards, Greg Shirey Ben E. Keith Co. ---------------------------------------------------------------------- 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 The sender believes that this E-mail and any attachments were free of any virus, worm, Trojan horse, and/or malicious code when sent. This message and its attachments could have been infected during transmission. By reading the message and opening any attachments, the recipient accepts full responsibility for taking protective and remedial action about viruses and other defects. The sender's employer is not liable for any loss or damage arising in any way from this message or its attachments. ---------------------------------------------------------------------- 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

