Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DFSORT - Omit duplicates with Input having 2 record types

Status
Not open for further replies.

andrearak

Programmer
Apr 28, 2009
1
0
0
US
How can I sort the following file omitting duplicate records. There are 2 record types. In this file example I have the first four records are unique, the remaining 8 are duplicates of the first four. I need to maintain the order of the first four records and have the duplicates (last eight removed):

Currently using this, which is causing the correct recs to be written (no dups) just in ascending order, which is not desired:
SORT FIELDS=(1,500,A),FORMAT=CH
SUM FIELDS=NONE
END

Is there some command to skip every other record so that only the first four records are written in the existing order?

0000001405700100000000000TFS701F 0102010202
ADH_LOS-ANGELES_20090422_124744
0000001408900100000000000TFS701R 0102010281
ADH_LOS-ANGELES_20090427_140010
0000001405700100000000000TFS701F 0102010202
ADH_LOS-ANGELES_20090422_124744
0000001408900100000000000TFS701R 0102010281
ADH_LOS-ANGELES_20090427_140010
0000001405700100000000000TFS701F 0102010202
ADH_LOS-ANGELES_20090422_124744
0000001408900100000000000TFS701R 0102010281
ADH_LOS-ANGELES_20090427_140010

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top