Operand descriptions
- FROM(indd)
- See the discussion of this operand on the COPY statement in COPY operator.
- TO(outdd)
- Specifies the ddname of the output data set to which DFSORT will
write the records it selects for the operation (that is, the records
that meet the specified criteria). Thus, the outdd data set will contain
the records selected by ALLDUPS, NODUPS, HIGHER(x), LOWER(y), EQUAL(v),
FIRST, FIRST(u), LAST, FIRSTDUP, FIRSTDUP(w) or
LASTDUP.
An outdd DD statement must be present and must define an output data set that conforms to the rules for DFSORT's SORTOUT data set (if the DISCARD operand is not specified) or OUTFIL data set (if the DISCARD operand is specified).
TO and DISCARD can both be specified. If DISCARD is not specified, TO must be specified. If TO is not specified, DISCARD must be specified.
The ddname specified in the TO operand must not be the same as the ddname specified in the FROM or DISCARD operand.
Refer to JCL restrictions for more information.
- DISCARD(savedd)
- Specifies the ddname of the output data set to which DFSORT will
write the records it does not select for this operation (that is,
the records that do not meet the specified criteria). Thus, the
savedd data set will contain the records discarded by ALLDUPS, NODUPS,
HIGHER(x), LOWER(y), EQUAL(v), FIRST, FIRST(u), LAST,
FIRSTDUP, FIRSTDUP(w) or LASTDUP.
A savedd DD statement must be present and must define an output data set that conforms to the rules for DFSORT's OUTFIL data set.
TO and DISCARD can both be specified. If DISCARD is not specified, TO must be specified. If TO is not specified, DISCARD must be specified.
The ddname specified in the DISCARD operand must not be the same as the ddname specified in the FROM or TO operand.
Refer to JCL restrictions for more information.
- ON(p,m,f)
- Specifies the position, length, and format of a numeric or character
field to be used for this operation. p specifies the first byte of the field relative to the beginning of the input record. p is 1 for the first data byte of a fixed-length record and 5 for the first data byte of a variable-length record as illustrated in the following (RRRR represents the 4-byte record descriptor word):
If INREC is specified, p must refer to the record as reformatted by INREC.Fixed-length record | Variable-length record | D | A | T | A | ... | | R | R | R | R | D | A | T | A | ... p= 1 2 3 4 | p= 1 2 3 4 5 6 7 8
m specifies the length of the field in bytes. A field must not extend beyond position 32752, or beyond the end of a record. If INREC is specified, a field must not extend beyond the end of the record as reformatted by INREC. The maximum length for a field depends on its format.
f specifies the format of the field as shown in the following table.Format Code Length Description BI 1 to 1500 bytes Unsigned binary FI 1 to 256 bytes Signed fixed-point PD 1 to 16 bytes Signed packed decimal ZD 1 to 31 bytes Signed zoned decimal CH 1 to 4000 bytes Character CSF or FS 1 to 32 bytes Signed numeric with optional leading floating sign UFF 1 to 44 bytes Unsigned free form numeric SFF 1 to 44 bytes Signed free form numeric Note: See Data format descriptions for detailed format descriptions.For a ZD or PD format field:- F, E, C, A, 8, 6, 4, 2, and 0 are treated as equivalent positive signs. Thus the zoned decimal values F2F3C1, F2F3F1 and 020301 are counted as only one unique value.
- D, B, 9, 7, 5, 3, and 1 are treated as equivalent negative signs. Thus the zoned decimal values F2F3B0, F2F3D0, and 020310 are counted as only one unique value.
- Digits are not checked for validity.
- ON(VLEN)
- See the discussion of this operand on the DISPLAY statement in DISPLAY operator.
- ALLDUPS
- Limits the records selected to those with ON values that occur
more than once (value count > 1). You can use this operand to keep
just those records with duplicate field values.
ALLDUPS is equivalent to HIGHER(1).
- NODUPS
- Limits the records selected to those with ON values that occur
only once (value count = 1). You can use this operand to keep just
those records with no duplicate field values.
NODUPS is equivalent to EQUAL(1) or LOWER(2).
- HIGHER(x)
- Limits the records selected to those with ON values that occur
more than x times (value count > x). You can use this operand to keep
just those records with field values that occur more than x times.
x must be specified as n or +n where n can be 0 to 99.
- LOWER(y)
- Limits the records selected to those with ON values that occur
less than y times (value count < y). You can use this operand to
keep just those records with field values that occur less than y times.
y must be specified as n or +n where n can be 0 to 99.
- EQUAL(v)
- Limits the records selected to those with ON values that occur
v times (value count = v). You can use this operand to keep just those
records with field values that occur v times.
v must be specified as n or +n where n can be 0 to 99.
- FIRST
- Limits the records selected to those with ON values that occur
only once (value count = 1) and the first record of those with ON
values that occur more than once (value count > 1). You can use this
operand to keep just the first record for each unique field value.
FIRST is equivalent to FIRST(1).
- FIRST(u)
- Limits the records selected to those with ON values that occur
only once (value count = 1) and the first u records of those
with ON values that occur more than once (value count > 1). You
can use this operand to keep just the first u records for each
unique field value.
u must be specified as n or +n where n can be 1 to 999999999999999.
- LAST
- Limits the records selected to those with ON values that occur only once (value count = 1) and the last record of those with ON values that occur more than once (value count > 1). You can use this operand to keep just the last record for each unique field value.
- FIRSTDUP
- Limits the records selected to the first record of those with
ON values that occur more than once (value count > 1). You can use
this operand to keep just the first record of those records with duplicate
field values.
FIRSTDUP is equivalent to FIRSTDUP(1).
- FIRSTDUP(w)
- Limits the records selected to the first w records of those with
ON values that occur more than once (value count > 1). You can
use this operand to keep just the first w records of those
records with duplicate field values.
w must be specified as n or +n where n can be 1 to 999999999999999.
- LASTDUP
- Limits the records selected to the last record of those with ON values that occur more than once (value count > 1). You can use this operand to keep just the last record of those records with duplicate field values.
- VSAMTYPE(x)
- See the discussion of this operand on the COPY statement in COPY operator.
- UZERO
- See the discussion of this operand on the OCCUR statement in OCCUR operator.
- USING(xxxx)
- Specifies the first 4 characters of the ddname for the control
statement data set to be used by DFSORT for this operation. xxxx must
be four characters that are valid in a ddname of the form xxxxCNTL.
xxxx must not be SYSx.If USING is specified, an xxxxCNTL DD statement must be present and the control statements in it:
- Must conform to the rules for DFSORT's SORTCNTL data set.
- Should generally be used only for an INCLUDE or OMIT statement, an INREC statement, a SORT statement, comment statements, or OUTFIL statements as described for SELECT operator.