Basic compare of 2 fields does not result in not equal
VALUE1 = "99 USE SIDE DOOR "
VALUE2 = " 99 USE SIDE DOOR"
IF VALUE1 = VALUE2 THEN SAY "VALUES EQUAL"
IF VALUE1 ¬= VALUE2 THEN SAY "VALUES DO NOT EQUAL"
Result VALUES EQUAL, Need to include blanks and treat them as not equal
How can I compare these without having to do a loop like this
VALEQ = 0
DO V = 1 TO RL_LEN.I
V1 = SUBSTR(VALUE1,V,1)
V2 = SUBSTR(VALUE2,V,1)
IF V1 ¬= V2 THEN VALEQ = 1
IF V1 ¬= V2 THEN V = 99
END
IF VALEQ = 0 THEN SAY "VALUES EQUAL"
IF VALEQ = 1 THEN SAY "VALUES DO NOT EQUAL"
VALUE1 = "99 USE SIDE DOOR "
VALUE2 = " 99 USE SIDE DOOR"
IF VALUE1 = VALUE2 THEN SAY "VALUES EQUAL"
IF VALUE1 ¬= VALUE2 THEN SAY "VALUES DO NOT EQUAL"
Result VALUES EQUAL, Need to include blanks and treat them as not equal
How can I compare these without having to do a loop like this
VALEQ = 0
DO V = 1 TO RL_LEN.I
V1 = SUBSTR(VALUE1,V,1)
V2 = SUBSTR(VALUE2,V,1)
IF V1 ¬= V2 THEN VALEQ = 1
IF V1 ¬= V2 THEN V = 99
END
IF VALEQ = 0 THEN SAY "VALUES EQUAL"
IF VALEQ = 1 THEN SAY "VALUES DO NOT EQUAL"