I have two fields in the File. CustomerID and Value. Both are numeric field. File can contain upto 16 "Value" field for a "CustomerID". My need is to sort descending by the field "Value" and pickup 3 Records for a CustomerID. So the output file will contain,
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Here's a DFSORT job that will do what you asked for. I assumed your input file has RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes.