The INCLUDE and OMIT instructions specify conditions under which individual records may be included in or excluded from, respectively, a sort or merge process. As with SORT and MERGE, these instructions are mutually exclusive. Each SORT or MERGE instruction may have a single optional INCLUDE or OMIT conditional (COND) phrase. Syntax for these instructions is as follows:
omit cond (start, length, type, comparison expression) include cond (start, length, type, comparison expression)
where start, length, and type are as defined for the SORT/MERGE instructions, and comparison expression sets the conditions for a specified comparison.
Conditional constants ALL and NONE match all or none of the records, respectively. As an example, each of the following statements would result in the inclusion of all records:
include cond = all
omit cond = none
To omit all records, you would use one of the following statements:
omit cond = all
include cond = none
A default record field type may be specified for an INCLUDE/OMIT instruction by setting FORMAT to the desired type. This assignment can appear either before or after the COND phrase. Record field specifications without the type inherit the default type specified by FORMAT. A warning is issued if the default format is specified but never used.
The INCLUDE or OMIT instruction comparison expression may compare a record field against another record field or against a constant. The size of an expression is not limited. Comparison operators are:
|GE||Greater than or equal to|
|LE||Less than or equal to|
|NE||Not equal to|