Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Thank you. It's already helped me greatly, and I enjoy just reading the inputs from the other members..."

Geography

Where in the world do Tek-Tips members come from?

DFSORT - Omit duplicates with Input having 2 record types

andrearak (Programmer)
28 Apr 09 18:34
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               

 
MarcLodge (Programmer)
30 Apr 09 11:57
Have a look at this doc:
http://www-947.ibm.com/systems/support/resources/sorttrck.pdf

It should provide you with what you are looking for.

Marc

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close