Example: Records that have an Invoice Status Code of F (fully paid) are to be omitted in preparing a list of only those customers with outstanding payments. (The input record layout is given in the figure Figure 1 and a sample input record is given in the figure Sample Input Record.)
To produce this list of customers selected from the masterfile, the following is coded.
Explanation: In this application, a simple comparison is necessary to identify those masterfile records that are not needed: the Invoice Status Code field (80,1,CH) has to be compared to the constant 'F'.
The OMIT statement’s condition, 80,1,CH,EQ,C'F', (see the figure JCL and Required Control Statements) guarantees that invoice records, like the sample record shown above, with the Invoice Status Code 'F' are omitted from the sort.