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


RESIZE operator

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

Read syntax diagramSkip visual syntax diagram
>>-RESIZE--FROM(indd)--TO(outdd)--TOLEN(n)--+-------------+----><
                                            '-USING(xxxx)-'   

Produces fixed length output records, with the specified TOLEN length, from fixed length input records of a different length, as follows:

  • If the input length is smaller than the requested TOLEN size, multiple smaller input records are combined into one larger output record of size TOLEN. If the combined input records do not completely fill up an output record, the output record will be padded on the right with blanks. For example, if we have five input records of 20 bytes and TOLEN is 70, two output records of 70 bytes will be created. The first output record will have input records 1-3 (60 bytes) followed by 10 blanks, and the second output record will have input records 4-5 (40 bytes) followed by 30 blanks. Note that the first 10 bytes of input record 4 are not used for the first output record; bytes or words are not "wrapped" between records.
    To illustrate, if the following RESIZE operator was specified:
    RESIZE FROM(FB20) TO(FB70) TOLEN(70)
    and FB20 had these 20 byte input records:
    <111111111111111111>
    <222222222222222222>
    <333333333333333333>
    <444444444444444444>
    <555555555555555555>
    FB70 would have these 70 byte output records:
    <111111111111111111><222222222222222222><333333333333333333>
    <444444444444444444><555555555555555555>
  • If the input length is larger than the requested TOLEN size, each larger input record is broken up into multiple smaller output records of size TOLEN. If a broken up input record does not completely fill up the multiple output records, the last of the multiple output records will be padded on the right with blanks. For example, if we have two input records of 50 bytes and TOLEN is 20, six output records of 20 bytes each will be created. The first two output records will have bytes 1-20 and 21-40 of the first input record (40 bytes), respectively. The third output record will have bytes 41-50 of the first input record (10 bytes) followed by 10 blanks. Likewise, the fourth output record will have bytes 1-20 of the second input record, the fifth output record will have bytes 21-40 of the second input record, and the sixth output record will have bytes 41-50 of the second input record followed by 10 blanks.
    To illustrate, if the following RESIZE operator was specified:
    RESIZE FROM(F50) TO(F20) TOLEN(20)
    and F50 had these 50 byte input records:
    <111111111111111111><222222222222222222><33333333>
    <444444444444444444><555555555555555555><66666666>
    F20 would have these 20 byte output records:
    <111111111111111111>
    <222222222222222222>
    <33333333>
    <444444444444444444>
    <555555555555555555>
    <66666666>

You must specify the FROM(indd), TO(outdd) and TOLEN(n) operands. The FROM data set must be fixed-length (for example, RECFM=FB). The TO data set must also be fixed-length (unless you use an OUTFIL statement with the FTOV operand to change the fixed-length resized records to variable-length output records). If a VSAM input data set is used, it will be treated as TYPE=F (fixed-length) by default. If you specify a variable-length input data set (or use TYPE=V for a VSAM input data set), the RESIZE operation will be terminated.

The USING(xxxx) operand is optional; do not supply your own MODS or OUTREC statement.

DFSORT is called to copy or sort the indd data set, as appropriate, before the records are resized. ICETOOL uses its E35 exit to create a larger record from multiple smaller records, or to create multiple smaller records from a larger record. ICETOOL passes the EQUALS option to DFSORT to ensure that if records are sorted, duplicate records are kept in their original input order when resized.

If USING(xxxx) is specified, any SORT, INCLUDE, OMIT, INREC, or SUM statement specified in xxxxCNTL is processed before the records are resized. The order of the records, and the input length, will be affected by these control statements. Any OUTFIL statements specified in xxxxCNTL are processed after the records are resized.

The DYNALLOC option is passed to DFSORT to ensure that work space is available for the sort. If your installation defaults for dynamic allocation are inappropriate for a RESIZE operator, you can take one of the following actions:
  1. Override the DYNALLOC option using an OPTION control statement such as:
      OPTION DYNALLOC=(,8)

    in the xxxxCNTL data set.

  2. Use xxxxWKdd DD statements to override the use of dynamic allocation. Refer to SORTWKdd DD statement for details.

Tape work data sets cannot be used with ICETOOL.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014