INCLUDE/OMIT statement notes

Table 1 shows how DFSORT reacts to the result of a relational condition comparison, depending on whether the statement is INCLUDE or OMIT and whether the relational condition is followed by an AND or an OR logical operator.

When writing complex statements, the table in Table 1 helps you get the result that you want.

Table 1. Logic Table for INCLUDE/OMIT.
Statement Relational Condition Program action if next logical operator is:
Compare AND OR
OMIT True Check next compare, or if last compare OMIT record. OMIT record
OMIT False INCLUDE record Check next compare, or if last compare, INCLUDE record.
INCLUDE True Check next compare, or if last compare, INCLUDE record. INCLUDE record
INCLUDE False OMIT record Check compare, or if last compare, OMIT record.