z/OS DFSORT Application Programming Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Operand descriptions

z/OS DFSORT Application Programming Guide
SC23-6878-00

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 produces for the operation (that is, the spliced records, the non-duplicate records if KEEPNODUPS is specified, and the base records if KEEPBASE is specified).

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.

The ddname specified in the TO operand must not be the same as the ddname specified in the FROM operand.

Refer to JCL restrictions for more information.

ON(p,m,f)
See the discussion of this operand on the SELECT statement in SELECT operator.
WITH(p,m)
Specifies the position and length of a field to be overlaid from the overlay record on to the base record.
p specifies the first byte of the field relative to the beginning of the overlay 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):
   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
If INREC is specified, p must refer to the record as reformatted by INREC.

m specifies the length of the field in bytes. A field must not extend beyond position 32752.

A WITH field will not be used to overlay the RDW of a variable-length base record or to overlay bytes from beyond the end of an overlay record on to a base record. When necessary, WITH fields will be adjusted to prevent these situations. For example, if WITH(1,6) is specified for a variable-length record, it will be treated as WITH(5,2) and if WITH(75,10) is specified for an 80-byte overlay record, it will be treated as WITH(75,6).

A WITH field will not be used to overlay bytes beyond the end of a base record. When necessary, WITH fields will be adjusted to prevent this situation. For example, if WITH(75,10) is specified for an 80-byte base record, it will be treated as WITH(75,6). However, if you specify VLENMAX or VLENOVLY, a WITH field can be used to overlay bytes beyond the end of a base record provided that WITH field is present in the overlay record. For example, if VLENMAX and WITH(75,10) is specified for an 80-byte base record and a 90-byte overlay record, the spliced record will have a length of 90 bytes and the WITH(75,10) field will be present at positions 75-84 followed by 6 blanks in positions 85-90.

WITHALL
Specifies that the first duplicate is spliced with specified fields from the second duplicate, and then from each subsequent duplicate in turn. All of the WITH fields (nonblank and blank) from each overlay record are overlaid on to the base record.

With WITHALL, a spliced output record is created from each base record and overlay record, resulting in n-1 spliced records for each set of n duplicates.

WITHALL overrides the default of splicing the first duplicate with all of the specified fields from the last duplicate.

WITHANY
Specifies that the first duplicate is spliced with specified nonblank fields from each subsequent duplicate. Each nonblank WITH field from each overlay record is overlaid on to the base record.

With WITHANY, a single spliced output record is created using the base record and each nonblank field from each overlay record. If more than one overlay record has a nonblank value for a WITH field, the nonblank value from the last overlay record for that WITH field will appear in the output record. Note that the specified "field" from an overlay record can actually consist of multiple fields from the record that have previously been reformatted into one contiguous field.

WITHANY overrides the default of splicing the first duplicate with all of the specified fields from the last duplicate.

VLENOVLY cannot be specified with WITHANY.

WITHEACH
Specifies that the first duplicate is spliced with one specified field from each subsequent duplicate. One WITH field (nonblank or blank) from each overlay record is overlaid on to the base record. The first WITH field specifies the bytes to be overlaid from the second duplicate record on to the first duplicate record. The second WITH field specifies the bytes to be overlaid from the third duplicate record on to the first duplicate record, and so on. For any set of duplicates, extra overlay records without matching WITH fields, or extra WITH fields without matching overlay records are ignored.

With WITHEACH, a single spliced output record is created using the base record and one field from each overlay record. Note that the specified "field" from an overlay record can actually consist of multiple fields from the record that have previously been reformatted into one contiguous field.

WITHEACH overrides the default of splicing the first duplicate with all of the specified fields from the last duplicate.

VLENOVLY cannot be specified with WITHEACH.

KEEPNODUPS
Specifies that non-duplicate records are to be kept as well as spliced records. The non-duplicate records will be unchanged.
KEEPBASE
Specifies that base records (first duplicate) are to be kept as well as spliced records. The base records will be unchanged.
VLENMAX
Specifies that for variable-length records, the length of the spliced record is set to the maximum length of the base record and overlay record. VLENMAX overrides the default of setting the length of the spliced record to the length of the base record.

If VLENMAX is specified with or without WITHALL, the spliced record is given the larger of the base record length or overlay record length. If the overlay record length is larger than the base record length, bytes in the extended spliced record that are not overlaid are filled in with blanks.

If VLENMAX is specified with WITHANY or WITHEACH, the spliced record is given the largest of the base record length or overlay record lengths. If the largest overlay record length is larger than the base record length, bytes in the extended spliced record that are not overlaid are filled in with blanks.

For fixed-length records, VLENMAX is ignored since the base, overlay and spliced records all have the same length.

VLENOVLY
Specifies that for variable-length records, the length of the spliced record is set to the length of the overlay record. VLENOVLY overrides the default of setting the length of the spliced record to the length of the base record.

If VLENOVLY is specified with or without WITHALL, the spliced record is given the overlay record length. If the overlay record length is larger than the base record length, the spliced record is padded with blanks from the end of the base record to the new length. If the overlay record length is smaller than the base record length, bytes in the extended spliced record that are not overlaid are filled in with blanks.

VLENOVLY cannot be specified with WITHANY or WITHEACH.

For fixed-length records, VLENOVLY is ignored since the base, overlay and spliced records all have the same length.

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:
  1. Must conform to the rules for DFSORT's SORTCNTL data set.
  2. Should generally be used only for an INCLUDE or OMIT statement, an INREC statement, comment statements, or appropriate OUTFIL statements as described for SPLICE operator.
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.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014