We can use the ENDREC parameter to get the first 1000 records from a file and copy it to another file. The Sample JCL is as follows :--
//JOBCARD
//STEP01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTIN DD DSN=<INPUT FILE>,
// DISP=SHR
//SORTOUT DD DSN=<OUTPUT FILE>,
// DISP=SHR
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=OUT,ENDREC=1000
/*
We can give any value in the ENDREC field. Depending on the value, the extraction will happen from the input file.
//JOBCARD
//STEP01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTIN DD DSN=<INPUT FILE>,
// DISP=SHR
//SORTOUT DD DSN=<OUTPUT FILE>,
// DISP=SHR
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=OUT,ENDREC=1000
/*
We can give any value in the ENDREC field. Depending on the value, the extraction will happen from the input file.
No comments:
Post a Comment