ICETOOL - RESIZE Operator


Creates a larger record from multiple shorter records if the input length is smaller than the specified length.

Creates multiple shorter records from a larger record if the input length is greater than the specified length.

Produces fixed length output records of a specified length from fixed length input records.


Syntax: -



Required Operands: -


FROM -

Specifies the ddname of the input data set.

DD statement must supply for the ddname specified.


TO -

Specifies the ddname of the output data set.

DD statement must supply for the ddname specified.


TOLEN -

Specifies the record length to use for the resized output records.

n can be 1 to 32760.


Optional Operands: -


USING -

Specifies the first 4 characters of the ddname (xxxxCNTL) for the DFSORT control statement data set.

DD statement must supply for xxxxCNTL if USING(xxxx) is specified.


Example: -

Below example to resize the employees record length from 80 to 49.


Input: -

MTHUSR.INPUT.DATASET -


JCL: -

----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** Top of Data ******************************
//MTHUSRR JOB (123),'MTHUSR',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),         
//             NOTIFY=&SYSUID                                           
//*                                                                     
//STEP01   EXEC PGM=ICETOOL                                             
//INDD     DD DSN=MTHUSR.INPUT.DATASET,DISP=SHR                         
//OUTDD1   DD DSN=MTHUSR.OUTPUT.DATASET1,                               
//            DISP=(NEW,CATLG,DELETE),                                  
//            SPACE=(TRK,(1,1),RLSE),UNIT=SYSDA,                        
//            DCB=(DSORG=PS,RECFM=FB,LRECL=49,BLKSIZE=490)              
//TOOLIN   DD *                                                         
  RESIZE FROM(INDD) TO(OUTDD1) TOLEN(49)                                
/*                                                                      
//TOOLMSG  DD DSN=MTHUSR.OUTPUT.TOOLMSG1,DISP=SHR                       
//DFSMSG   DD SYSOUT=*                                                  
//                                                                      
**************************** Bottom of Data ****************************


OUTPUT: -

TOOLMSG: -


MTHUSR.OUTPUT.DATASET1: -


Explaining Solution: -

  • INDD - Specifies the ddname for input dataset.
  • OUTDD1 - Specifies the ddname for output dataset.
  • TOOLIN DD * - Specifies the ICETOOL statements for DFSORT.
  • TOOLMSG - Specifies ICETOOL message data set.
  • DFSMSG - Specifies DFSORT message data set.
  • RESIZE FROM(INDD) TO(OUTDD1) TOLEN(49) - Resizes the input records from the length 80 to the new length 49 and writes the records to the OUTDD1.