Created On: 22 December 2011
Problem:
In RM COBOL we use the following line of code and it works fine.
IF (TEST-FIELD(1:1) IS LIKE CASE-INSENSITIVE “S”)
In Visual COBOL this same statement causes an "Invalid Operand" error.
IF (TEST-FIELD(1:1) IS LIKE CASE-INSENSITIVE “S”)
In Visual COBOL this same statement causes an "Invalid Operand" error.
Resolution:
The UPPER-CASE intrinsic function can be used instead of the CASE-INSENSITIVE of RM.
IF FUNCTION UPPER-CASE(TEST-FIELD(1:1)) = "S"
IF FUNCTION UPPER-CASE(TEST-FIELD(1:1)) = "S"