the 5th byte here i.e. A,B,C E,P here indicate record types.
I want to sort this file based on 6th position to 4 bytes for A type record only, but I want i want record types to be in same order i.e. A should be first. The file can contain some vales in same position for other record types.
Op should be like this:
the issue I am facing is that I want A to P records in ascending order based on field of A type record only.
Please help me
Vicky _________________ Thanks and Regards
You have groups of records of different types, and you want to sort on data from the record which defines the start of the group.
So, you'll need to use IFTHEN=(WHEN=GROUP with PUSH to extend the records on INREC, by inserting the extension at the beginning of the record because they are variable, so that all of the records in a group have the same key. You then SORT on the extended key, with OPTION EQUALS, and then with OUTREC or OUTFIL return the records, now in the order that you want, to their original size.
Joined: 24 Jul 2011 Posts: 651 Location: Down on the pig farm
Posted: Wed Jan 08, 2014 2:19 pm Post subject:
Vicky - I suggest you get to know your forums: at the top is a link to the IBM manuals (DFSort - for Syncsort you will have to ask around your co-workers). Also, there is a search facility so you can search for the keywords within the forum.
And, which are you using - DFSort or Syncsort? _________________ Regards
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum