Sample code to demonstrate behaviour:
FOR EACH _Connect NO-LOCK WHERE _Connect-Id LE 0:
DISPLAY _Connect-Id.
END.
FOR EACH _Lock NO-LOCK WHERE _Lock-Id = 0:
DISPLAY _Lock-Id.
END.
FOR EACH _Trans NO-LOCK WHERE _Trans-Id < 0:
DISPLAY _Trans-Id.
END.
Examples of Queries returning incorrect results:
FOR EACH _connect WHERE _connect-id >= -5 AND _connect-id < 1:
FOR EACH _connect WHERE _connect-id >= -5 AND _connect-id < 0:
FOR EACH _connect WHERE _connect-id >= -5 AND _connect-id <= 0:
FOR EACH _connect WHERE _connect-id < 0:
FOR EACH _connect WHERE _connect-id <= 0:
When the bracket contains a negative number:
FOR EACH _connect WHERE _connect-id >= -5 AND _connect-id <= 10
causes error:
Client attempting to access recid 0 which is not part of file -16385. (438)
Examples of Queries returning correct results:
FOR EACH _connect WHERE _connect-id < 65535:
FOR EACH _connect WHERE _connect-id < 16776960: