DFSORT can be used to copying of datasets and records without sorting them. This tutorial will show you how to copy datasets using DFSORT.
Copy Using DFSORT
DFSORT can be used to copy entire datasets to a target physical/temporary datasets. There are three available SORT statements by which one can copy the datasets.
SORT FIELDS=COPY MERGE FIELDS=COPY OPTION COPY
All three above statements yields same results. You can use any of the above in SYSIN DD *
in your SORT step in your JCL.
Note: You can not use COPY with SUM control statements.
Complete JCL
//YOUR.JOB.CARD.HERE //* //STEP1 EXEC PGM=SORT //SORTIN DD DSN=ABCD.YOUR.SOURCE.PS.FILE,DISP=SHR //SORTOUT DD DSN=ABCD.DEST.PS.FILE,DISP=(,CATLG),SPACE=(TRK,(10,10)),UNIT=SYSDA //SYSOUT DD SYSOUT=* //SYSIN DD * OPTION COPY /*