I am using DFSORT to copy the Tape data-set to a temp file, and processing around 80000000 records. Its taking 3 Hours to just copy the data-sets. is there any other way around to reduce the CPU time. Suggestions will be very helpful. Thank You.
//STEP40 EXEC SORTD
//SORTIN DD DSN=FILEONE(0),
// DISP=SHR
//SORTOUT DD DSN=&&TEMP,
// DISP=(NEW,PASS,DELETE),
// DCB=(RECFM=FB,LRECL=30050,BLKSIZE=0),
// UNIT=TAPE
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(14,6,PD,A,8,6,PD,A,45,2,ZD,A)
OUTREC IFTHEN=(WHEN=(70,18,CH,EQ,C' encoding="IBM037"'),
OVERLAY=(70:C' encoding="UTF-8"'))
OPTION DYNALLOC=(SYSDA,255)
/*
A few comments on improving I/O performance which should improve your overall elapsed time.
From IBM's MVS JCL Manual on page 143.
//SORTIN DD DSN=FILEONE(0),
// DISP=SHR<b>,DCB=BUFNO=192</b>
//SORTOUT DD DSN=&&TEMP,
// DISP=(NEW,PASS,DELETE),
// DCB=(RECFM=FB,LRECL=30050,BLKSIZE=0,BUFNO=192),
// UNIT=TAPE
I chose 192 as its relatively cheap in terms of memory these days. Adjust for your environment. This essentially tells the system how many blocks to read with each I/O which reduces time related to I/O operations. You can play with this number to get an optimal result. The default is 5.
BUFNO=buffers
Specifies the number of buffers to be assigned to the DCB. The maximum normally is 255, but can be less because of the size of the region. Note: Do not code the BUFNO subparameter with DCB subparameters BUFIN, BUFOUT, or DD parameter QNAME.
Here is more information on BLKSIZE selection for tapes.
3490 Emulation (VTS) 262144 (256 KB)
3590 262144 (256 KB) (note: on some older models the limit is
229376 (224 KB) 262144 (256 KB)
//SORTOUT DD DSN=&&TEMP,
// DISP=(NEW,PASS,DELETE),
// DCB=(RECFM=FB,LRECL=30050,BLKSIZE=0,BUFNO=192),
// UNIT=(TAPE,2)
Of course these optimizations depend on your physical environment and DFSMS setup.