RESIZE Operator
RESIZE Operator (for Experienced)
Summary
For basic information, go through the RESIZE Operator (for Beginners)
- RESIZE operator creates a larger record from multiple shorter records if the input length is smaller than the specified length.
- It also creates multiple shorter records from larger ones if the input length is greater than the specified length.
- It produces fixed-length output records based on the specified length from fixed-length input records.
Syntax -

Required Operands
FROM -
- FROM parameter specifies ddname of the input file.
- indd DD statement is mandatory if FROM operand specified.
TO -
- TO operand specifies 1 to 10 ddnames of output files.
- outdd DD statement is mandatory if TO operand specified
- Either TO, USING, or both operands can code at the same time.
TOLEN -
- Specifies the record length uses for the resized output records.
- 'n' can be 1 to 32760.
Optional Operands
USING -
- USING operand specifies the first 4-characters of the ddname (xxxxCNTL) for the DFSORT control statement file.
- XXXX name is the user-defined name.
- xxxxCNTL DD statement is mandatory if USING(xxxx) is specified.
- Either TO, USING, or both operands can code at the same time.
Example -
Scenario - Resize the employees record length from 80 to 49.
INPUT - MATEPK.INPUT.PSFILE
BROWSE MATEPK.INPUT.PSFILE Line 00000000 Col 001 080
Command ===> Scroll ===> CSR
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
001 PAWAN MAINFRAME JPM AP IN
002 SRINIVAS TESTING ORACLE TG IN
003 SRIDHAR SAS CG OR US
004 VENKATESH ABAP CSC CA US
005 RAVI HADOOP CTS FL US
006 PRASAD HR INFOSYS MI US
007 RAJA TESTING IBM CA US
******************************** Bottom of Data ********************************
JCL -
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** Top of Data ******************************
//MATEPKRZ JOB (123),'MATEPK',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//*
//STEP01 EXEC PGM=ICETOOL
//INDD DD DSN=MATEPK.INPUT.PSFILE,DISP=SHR
//OUTDD DD DSN=MATEPK.OUTPUT.PSFILER,
// DISP=(NEW,CATLG,DELETE),VOLUME=SER=DEVHD4,
// SPACE=(TRK,(1,1),RLSE),UNIT=SYSDA,
// DCB=(DSORG=PS,RECFM=FB,LRECL=49,BLKSIZE=490)
//TOOLIN DD *
RESIZE FROM(INDD) TO(OUTDD) TOLEN(49)
/*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//
**************************** Bottom of Data ****************************
OUTPUT - MATEPK.OUTPUT.PSFILER
BROWSE MATEPK.OUTPUT.PSFILER Line 00000000 Col 001 049
Command ===> Scroll ===> CSR
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
001 PAWAN MAINFRAME JPM
AP IN
002 SRINIVAS TESTING ORACLE
TG IN
003 SRIDHAR SAS CG
OR US
004 VENKATESH ABAP CSC
CA IN
005 RAVI HADOOP CTS
FL US
006 PRASAD HR INFOSYS
MI US
007 RAJA TESTING IBM
CA US
******************************** Bottom of Data ********************************
TOOLMSG (SDSF SPOOL) - Verify TOOLMSG for the return code of the submitted job.
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9
********************************* TOP OF DATA ********************************************
1ICE600I 0 DFSORT ICETOOL UTILITY RUN STARTED
ICE650I 0 VISIT http://www.ibm.com/storage/dfsort FOR ICETOOL PAPERS, EXAMPLES AND MORE
ICE632I 0 SOURCE FOR ICETOOL STATEMENTS: TOOLIN
ICE630I 0 MODE IN EFFECT: STOP
RESIZE FROM(INDD) TO(OUTDD) TOLEN(49)
ICE627I 0 DFSORT CALL 0001 FOR COPY FROM INDD TO OUTDD COMPLETED
ICE659I 0 RECORDS RESIZED FROM 00080 BYTES TO 00049 BYTES
ICE602I 0 OPERATION RETURN CODE: 00
ICE601I 0 DFSORT ICETOOL UTILITY RUN ENDED - RETURN CODE: 00
******************************** BOTTOM OF DATA ******************************************
Explaining Solution -
- INDD - Specifies the ddname for input file.
- OUTDD - Specifies the ddname for output file.
- TOOLIN DD * - Specifies the ICETOOL statements for DFSORT.
- TOOLMSG - Specifies where to write the ICETOOL processing messages.
- DFSMSG - Specifies where to write the DFSORT processing messages.
- 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 OUTDD.