View previous topic :: View next topic
|
Author |
Message |
t5590ag
Active User
Joined: 21 May 2009 Posts: 139 Location: United States
|
|
|
|
is it possible to sort on few hard coded values.
My input is -
AA530
BB540
AA550
AA540
BB530
BB550
O/P has to be -
AA550
AA530
AA540
BB550
BB530
BB540 |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
OK, why should we work out what you mean? Can you explain the process? |
|
Back to top |
|
|
t5590ag
Active User
Joined: 21 May 2009 Posts: 139 Location: United States
|
|
|
|
well, because I don't have a timestamp in my file, and this number sequence 550-530-540 is a way I can supply data downstream in the correct order. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
You may have to write a small program to do what you have described. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Is the number 550-530-540 always? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
While reading the input, assign a "sort control" of 1, 2, or 3 for each record to be used for sorting. When the output is written, write only the original input without the additional control fiels. |
|
Back to top |
|
|
t5590ag
Active User
Joined: 21 May 2009 Posts: 139 Location: United States
|
|
|
|
thanks Dick, yes that would be one option I have thought of, or else I might have to include an EZTRV/pgm to this minor task.
Pandora, yes these are only 3 possible values. and that is what I was trying to take advantage of if possible in a sort step. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Why add another language step to the process?
What you want is rather minor with sort . . . |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Or...
Edit the file, enter the SORT command and save the file (or a copy of it or as a new member) and bypass the sort step.
How do we know what you really need? |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
t5590ag wrote: |
well, because I don't have a timestamp in my file, and.... |
and why is the timestamp relevant (assuming you mean the statistics)? |
|
Back to top |
|
|
|