grouping together records



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

grouping together records

Postby cbf5516 » Thu Jan 27, 2011 3:01 am

I need to group together records based on a key in every record and then sort based upon a column value which would only be in one of the records.

I'll try to show an example and would appreciate if you could help me understand which commands would be best.

BA0001
BA0001
BA0001  02  Z15
BA0001
BA0002
BA0002  02  Z16
BA0002
BA0002
BA0003
BA0003  02  Z15
BA0003
BA0003

I would like to search the 02's and sort the entire number based upon the z value if possible. from what I see I'm running 1.3. Thank you for your time.
cbf5516
 
Posts: 2
Joined: Thu Jan 27, 2011 1:57 am
Has thanked: 0 time
Been thanked: 0 time

Re: grouping together records

 

Re: grouping together records

Postby MrSpock » Thu Jan 27, 2011 10:16 am

I'm sorry, but what would be your expected output? And what is the RECFM and LRECL of the input dataset?
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: grouping together records

Postby cbf5516 » Thu Jan 27, 2011 7:45 pm

Thank you MrSpock. For my example the format would be vb and length would be 50.
The output I would want should look like the following:
BA0001
BA0001
BA0001 02 Z15
BA0001
BA0003
BA0003 02 Z15
BA0003
BA0003
BA0002
BA0002 02 Z16
BA0002
BA0002

I want to sort the entire file keeping the numbers grouped together, but have the sort by the z**. So the z15 id's should all come before the z16.
cbf5516
 
Posts: 2
Joined: Thu Jan 27, 2011 1:57 am
Has thanked: 0 time
Been thanked: 0 time

Re: grouping together records

Postby pjagathis » Thu May 26, 2011 10:51 am

Please post your clear sample input and output data..

Whether you want to group the records on first field and sort on third field???
Thanks and Regards,
Jagathis P
pjagathis
 
Posts: 67
Joined: Wed May 04, 2011 5:04 pm
Location: Chennai
Has thanked: 0 time
Been thanked: 0 time

Re: grouping together records

Postby NicC » Thu May 26, 2011 1:21 pm

I suspect that in the 4 months since the request either a solution was found or a change in requirements was made. Either way a post would have been nice so as to provide a clean end to the thread.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post