|
>>-OMIT--COND=--+-(logical expression)-+----------+-+----------><
| '-FORMAT=f-' |
+-ALL-------------------------------+
'-NONE------------------------------'
Use an OMIT statement if you do not want all of the input records
to appear in the output data sets. The OMIT statement selects the
records you do not want to include.
You can specify either an INCLUDE statement or an OMIT statement
in the same DFSORT run, but not both.
The way in which DFSORT processes short INCLUDE/OMIT compare fields
depends on the settings for VLSCMP/NOVLSCMP and VLSHRT/NOVLSHRT. A
short field is one where the variable-length record is too short to
contain the entire field, that is, the field extends beyond the record.
For details about including or omitting short records, see the discussion
of the VLSCMP and NOVLSCMP options in OPTION control statement.
A logical expression is one or more relational conditions logically
combined, based on fields in the input record, and can be represented
at a high level as follows:
>>-relational condition1---------------------------------------->
>--+----------------------------------------+------------------><
| .-.----------------------------------. |
| V | |
'---,--+-AND-+--,relational condition2-+-'
'-OR--'
If the logical expression is true for a given record, the record
is omitted from the output data set.
Five types of relational conditions can be
used as follows:
- Comparisons:
Compare two compare
fields or a compare field and a decimal, hexadecimal, character or
current, future, or past date constant.
For example,
you can compare the first 6 bytes of each record with its last 6 bytes,
and omit those records in which those fields are identical. Or you
can compare a date field with today's date, yesterday's date, or tomorrow's
date and omit those records accordingly.
- Substring Comparison Tests:
Search for
a constant within a field value or a field value within a constant.
For
example, you can search the value in a 6-byte field for the character
constant C'OK', and omit those records for which C'OK' is found somewhere
in the field. Or you can search the character constant C'J69,L92,J82'
for the value in a 3-byte field, and omit those records for which
C'J69', C'L92', or C'J82' appears in the field.
- Bit Logic Tests:
Test the state (on or
off) of selected bits in a binary field using a bit or hexadecimal
mask or a bit constant.
For example, you can omit those records
which have bits 0 and 2 on in a 1-byte field. Or you can omit those
records which have bits 3 and 12 on and bits 6 and 8 off in a 2-byte
field.
- Date Comparisons:
Compare a two-digit
year date field to a two-digit year date constant, the current two-digit
year date or another two-digit year date field, using the century
window in effect.
For example, you can omit only those records
for which a Z'yymm' date field is between January 1996 and March 2005.
Or you can omit only those records for which a P'dddyy' field is less
than another P'dddyy' field.
- Numeric Tests:
Test a
field for numerics or non-numerics in character, zoned decimal, or
packed decimal format.
For example, you can omit only those
records in which a 5-byte field contains only '0'-'9' characters (that
is, numerics). Or you can omit only those records in which a 9-byte
field contains invalid ZD numeric data (that is, non-numerics). Or
you can omit only those records in which a 12-byte field contains
valid PD numeric data (that is, numerics).
- Alphanumeric Tests:
Test
a field for alphanumerics or non-alphanumerics in character format.
Various combinations of uppercase characters (A-Z), lowercase characters
(a-z) and numeric characters (0-9) can be used.
For example,
you can omit only those records in which a 10-byte field contains
only 'A'-'Z' characters (that is, uppercase characters) or '0'-'9'
characters (that is, numeric characters). Or you can omit only
those records in which a 20-byte field contains characters other
than 'a'-'z' (that is, lowercase characters).
For complete details on the parameters of the OMIT control statement,
see INCLUDE control statement.
The OMIT control statement differs from the OMIT parameter of the
OUTFIL statement in the following ways: - The OMIT statement applies to all input records; the OMIT parameter
applies only to the OUTFIL input records for its OUTFIL group.
- FORMAT=f can be specified with the OMIT statement but not with
the OMIT parameter. Thus, you can use FORMAT=f and p,m or p,m,f fields
with the OMIT statement, but you must only use p,m,f fields with the
OMIT parameter. For example:
OMIT FORMAT=BI,
COND=(5,4,LT,11,4,OR,21,4,EQ,31,4,OR,
61,20,SS,EQ,C'FLY')
OUTFIL OMIT=(5,4,BI,LT,11,4,BI,OR,21,4,BI,EQ,31,4,BI,OR,
61,20,SS,EQ,C'FLY')
- D2 format can be specified with the OMIT statement but not with
the OMIT parameter.
See OUTFIL control statements for more details on the OUTFIL OMIT parameter. - COND
>>-COND=--+-(logical expression)-+-----------------------------><
+-ALL------------------+
'-NONE-----------------'
- logical expression
- specifies one or more relational conditions logically combined,
based on fields in the input record. If the logical expression is
true for a given record, the record is omitted from the output data
sets.
- ALL
- specifies that all of the input records are to be omitted from
the output data sets.
- NONE
- specifies that none of the input records are to be omitted from
the output data sets.
Default: NONE. See Specification/override of DFSORT options for
full override details.
Applicable Functions: See Specification/override of DFSORT options.
- FORMAT
>>-FORMAT=f----------------------------------------------------><
For details on this parameter, see INCLUDE control statement.
|