//SORT1 EXEC PGM=SORT
//SORTIN DD DSN=FILE.INPUT.PS,DISP=SHR
//SORTOUT DD DSN=FILE.OUTPUT.GDG(+1),
// DISP=(NEW,CATLOG,DELETE),
// DCB=(LRECL=(length of PS file),RECFM=FB,BLKSIZE=0)
//SYSIN DD *
SORT FIELDS=COPY
//SYSOUT DD SYSOUT=*
The above JCL is used to copy the data content from the PS file to the GDG file by creating a new generation.
Points:
1. The record length of the PD file and the GDG created newly should remain same
2. The RECFM of GDG file should be FM if the PS file is or should VB
No comments:
Post a Comment