File-Aid Relational Operators, Data Types
The relational Operator is used with Position, Length, and Data Value to set up a conditional test that File-AID is to perform when selecting records.
The valid relational operators are:
EQ = – equal to
NE ¬= – not equal to
GT > – greater than
LT < – less than
GE >= – greater than or equal to
LE <= – less than or equal to
BT – within a range of two values (endpoints inclusive)
NB – outside a range of two values (endpoints exclusive)
CO – search a field for presence of a data value
NC – search a field for the absence of a data value
VA – test a field for validity (Packed, Numeric)
NV – test a field for not valid (Packed, Numeric)
NO – bits are not ones (Mask data value only)
MX – bits are mixed, ones and zeros (Mask data value only)
FM – field mask. See the index for more information on Field Mask.
FF – field to field. See the index for more information.
OPERATOR VALIDITY BY DATA TYPE
The following table shows the valid operators that may be used with each of the seven data types:
DATA TYPE VALID OPERATORS
T (Text – any case) EQ,NE,GE,GT,LE,LT,CO,NC,BT,NB,FM,FF
C (Character – exact case) EQ,NE,GE,GT,LE,LT,CO,NC,BT,NB,FM,FF
X (Hex) EQ,NE,GE,GT,LE,LT,CO,NC,BT,NB,FF
P (Packed) EQ,NE,GE,GT,LE,LT, BT,NB,VA,NV,FM,FF
N (Numeric – zoned) EQ,NE,GE,GT,LE,LT, BT,NB,VA,NV,FM,FF
B (Binary) EQ,NE,GE,GT,LE,LT, BT,NB,FM,FF
M (Mask byte) EQ,NE, NO,MX,FF
BT (Between) and NB (Not between) CONVENTIONS:
For relational operators BT and NB, you specify your Data Value as two values separated by a colon (:). The values may be hex strings,character strings, or numeric tests. For example, the following values are equivalent:
Note that the BT relational operator includes the endpoints of the range you specify and the NB relational operator does not include the endpoints.