View previous topic :: View next topic
|
Author |
Message |
mohammad amir ashraff
New User
Joined: 08 Feb 2008 Posts: 23 Location: Hyderabad
|
|
|
|
This is the current state of records in the file:
Code: |
03 11 YHB0004489
03 11 YHB0004489
03 11 YHB0004489
03 11 YHB0004489
03 11 YHB0004489
03 11 YHB0004489
02 11 YHB0004489
01 11 YHB0004489
03 11 YHB0004536
03 11 YHB0004536
03 11 YHB0004536
03 11 YHB0004536
03 11 YHB0004536
03 11 YHB0004536
03 11 YHB0004536
03 11 YHB0004536
03 11 YHB0004536
03 11 YHB0004536
02 11 YHB0004536
01 11 YHB0004536 |
I want to achieve this:
Code: |
01 11 YHB0004489
02 11 YHB0004489
03 11 YHB0004489
03 11 YHB0004489
03 11 YHB0004489
03 11 YHB0004489
03 11 YHB0004489
03 11 YHB0004489
01 11 YHB0004536
02 11 YHB0004536
03 11 YHB0004536
03 11 YHB0004536
03 11 YHB0004536
03 11 YHB0004536
03 11 YHB0004536
03 11 YHB0004536
03 11 YHB0004536
03 11 YHB0004536
03 11 YHB0004536
03 11 YHB0004536 |
My shop uses SYNCSORT.
Please advise, how to achieve the above. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
I'm not sure if I've missed something to follow the output from input, but is not it a simple case of sorting data on 3rd filed and then on 1st?
Code: |
SORT FIELDS=(f3,length,UFF,A,f1,length,CH,A) |
|
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
What have you tried? What was wrong with that? It looks as though you want to sort on columns 1 & 2 within columns wherever YHB0004xxx are. Is that the case? If so , your major sort key is the column where YHB starts for 10 bytes and your minor key is column1 for 2 bytes. Unless there is something that you have not told us? |
|
Back to top |
|
|
mohammad amir ashraff
New User
Joined: 08 Feb 2008 Posts: 23 Location: Hyderabad
|
|
|
|
Thank you Anuj, your option worked. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Thanks for the feedback - as they say, even a blind squirrel finds an acorn once in a while.
Nic had the same suggestion too but a timestamp error occurred in between, looks like... |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Anuj, Nope - I was just more verbose. Your post was not there when I started but was there when I finished. |
|
Back to top |
|
|
|