EMS Manual
Compiled Filters
EMS Manual—426909-005
5-22
Comparisons
is not possible between a signed (or unsigned) value and a string (or file name) value.
These types are considered incompatible.
Comparing Values With Composite Data Types
The filter language treats certain token types as composites, for purposes of
comparing. These composites consist of two or more data-type elements, as defined
here. For example, a subsystem ID consists of six unsigned integers.
You can determine the elements by looking at the SIZE OF ELEMENT and NUMBER
OF ELEMENTS columns in Table 5-2. For example, the token type ZSPI^TDT^SSID
has a SIZE OF ELEMENT of 2 and a NUMBER OF ELEMENTS of 6, indicating that an
unsigned integer word is the basic element of the SSID type.
To compare the two composites, the filter examines them element by element until an
unequal comparison results. The filter then determines whether those elements are in
the relation specified by the comparison operator. The filter compares composites
similarly to the way it compares strings. That is, a string can be viewed as an array of
bytes.
You can define a new token type, based on basic token types, that will give you an
array of tokens. For example, you can include this structure definition in the DDL
source file:
?SECTION uvw-ddl-triple
! a triplet of signed integers
?TALBOUND 0
DEFINITION uvw-ddl-triple.
02 int TYPE zspi-ddl-int OCCURS 3 TIMES.
END
And include this TOKEN-TYPE declaration:
TOKEN-TYPE uvw-typ-triple VALUE IS zspi-tdt-int
DEF IS uvw-ddl-triple.
If you have included the definitions just mentioned, you have a user-defined type UVW-
DDL-TRIPLE, for the user subsystem UVW. You can use it to create triplets of integers.
The filter compares such entities element by element to determine the value of the
composite comparison. In this case, the filter performs a signed comparison of the
three elements. For another way to compare arrays, see Comparing Fields on
page 5-24.
Comparing Strings
In string comparisons, the compiler pads the shorter string with blanks before
performing a byte-by-byte comparison.