Operating Condition
Syntax: SET EQNULL ON/OFF
Default: OFF
This Command determines whether or not NULL = NULL.
Compare these code samples:
SET VAR v1 TEXT = NULL
SET VAR v2 TEXT = NULL
SET EQNULL OFF
IF v1 = .v2 THEN
-- will not be a hit
ENDIF
IF v1 <> .v2 THEN
-- will not be a hit
ENDIF
IF v1 <> 'This' THEN
-- will not be a hit (it used to be before this fix)
ENDIF
SET EQNULL ON
IF v1 = .v2 THEN
-- will be a hit
ENDIF
IF v1 <> .v2 THEN
-- will not be a hit
ENDIF
IF v1 <> 'This' THEN
-- will be a hit
ENDIF
Before this fix, the comparison "IF v1 <> 'This' THEN" would be a hit with EQNULL set ON or FALSE when it should only be a hit when EQNULL is ON. This means that now "IF (.v1) <> 'This' THEN" and "IF v1 <> 'This' THEN" will both process the same way. In the past they would be different because of this problem.
In your code if you want the comparison of a NULL variable and a non-NULL constant to be a hit then you should run with EQNULL set ON.