Download Video Performer

Wednesday, September 18, 2013

SORT - Separate out duplicate records from a file:

SORT code is given below:

//STEP001 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTIN DD DSN=X.Y, DISP=SHR
//SORTOUT DD DSN=X1.Y1,DISP=SHR
//SORTXSUM DD DSN=X2.Y2,DISP=SHR
//SYSIN DD*
  SORT FIELDS=(1,2,CH,A,13,11,CH,A)
  SUM FIELDS=NONE,XSUM
/*


- Duplicate records will be removed from the input file and will be written to SORTXSUM using sort utility.
 

No comments:

Post a Comment