At the select/omit-field level, you can specify a field name, a value, or
*NULL for the parameter.
If you specify a value, the following rules apply:
- If you are defining a character field, specify a character constant or a
hexadecimal character string.
Specify character strings with apostrophes (see Figure 32).
Specify hexadecimal character strings as an X followed by a combination of
the digits 0 through 9 and the letters A through F, enclosed in
apostrophes. The number of hexadecimal digits in apostrophes must be
exactly twice the specified length of the field (see Figure 33).
- If you are defining a numeric field, specify a numeric string (digits 0
through 9 specified without apostrophes) as shown in Figure 33.
- If you are defining a date field, specify a valid date in the same format
specified on the DATFMT keyword and use the same separator as specified on the
DATSEP keyword. For example, COMP(EQ '12/15/91')
is the default value if *MDY is specified for DATFMT and '/' is
specified for DATSEP.
- If you are defining a time field, specify a valid time in the same format
specified on the TIMFMT keyword and use the same separator as specified on the
TIMSEP keyword. For example, COMP(EQ
'11.00.00') is the default value if *ISO is
specified for TIMFMT. The default separator for *ISO is a period
(.).
- If you are defining a timestamp field, you must specify the default value
in the following format:
COMP(EQ 'YYYY-MM-DD-HH.MM.SS.UUUUUU')
If you specify *NULL, the relational operator must be EQ or NE.
COMP selects or omits records retrieved from the physical file on which
this logical file is based when your program sends an input operation to the
record format you are defining. The OS/400 program selects or omits
records as a result of testing the value of the select/omit fields against the
value you specify, the value of the field whose name you specify, or the null
value (if *NULL was specified).
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]