Excluding records

You can limit the records affected by the FIND, CHANGE and DELETE commands, first by excluding some records from display, then by limiting those commands to affecting only the not-excluded records, or only the excluded records.

To exclude individual records on an ad hoc basis, choose one of the following methods:

To exclude multiple records based on a common factor:

EXCLUDE commands are cumulative; each successive EXCLUDE command increases the number of records already excluded.

To “unexclude” (redisplay) excluded records, choose one of the following methods:

After you have excluded records, you can limit the effects of the FIND, CHANGE and DELETE commands to only those records that are excluded or only those that are not-excluded. You do this by including one of the following option parameters with the primary command:

X or EX
Search only excluded records
NX
Search only not-excluded records

For example, the following command changes all occurrences of the string “no”, “NO” or “nO” to “No” in all not-excluded records:

CHANGE NO C'No' ALL NX
Note:
  1. If neither parameter is used with the primary command, both excluded and not-excluded records are affected.
  2. If an excluded record is affected by a primary command, either by using the EX parameter or by not specifying an EXCLUDE parameter, the record becomes not-excluded.