Remove Duplicates using DFSORT/ICETOOL

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
sprathap1987
Member
Posts: 1
Joined: Sat May 26, 2012 10:32 pm

Remove Duplicates using DFSORT/ICETOOL

Post by sprathap1987 » Thu Jul 23, 2015 4:50 pm

Hi All,

I have a file with size 80 bytes (fixed length). In the 10th position I have a character field with 10bytes length (X(10)).
Example Input File (providing only 10 bytes):
AAA
BBBBB
AA
CCCCC
BB
AAAAAAA
BBBBB
BB
CCCCC
AAAAA

Now I need to treat the values AA, AAA, AAAAAAAA as duplicates in the position 10 and display the output as:
AAA
BBBBB
CCCCC

Is it possible to do this using DFSORT/ICETOOL, if yes,
Could you please provide me the sort card for this.

Thank you,
Siva

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Thu Jul 23, 2015 6:19 pm

If you can guarantee that the data is like that, SORT on the first character in the field, with OPTION EQUALS and use SUM FIELDS=NONE.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others