IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

sort on hard coded values


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Wed Apr 30, 2014 5:29 am
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Apr 30, 2014 5:40 am
Reply with quote

OK, why should we work out what you mean? Can you explain the process?
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Wed Apr 30, 2014 7:00 am
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Wed Apr 30, 2014 11:35 am
Reply with quote

You may have to write a small program to do what you have described.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Apr 30, 2014 11:50 am
Reply with quote

Is the number 550-530-540 always?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Apr 30, 2014 10:41 pm
Reply with quote

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
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu May 01, 2014 6:50 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 01, 2014 11:37 pm
Reply with quote

Hello,

Why add another language step to the process?

What you want is rather minor with sort . . .
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Fri May 02, 2014 12:47 am
Reply with quote

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
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Fri May 02, 2014 12:56 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top