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