MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sorting Alphanumeric data in ascending order

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
priyaranjan.mishra
Beginner


Joined: 21 Jan 2008
Posts: 17
Topics: 9

PostPosted: Fri Feb 21, 2014 8:56 am    Post subject: Sorting Alphanumeric data in ascending order Reply with quote

I am trying to sort a certain portion of my i/p file using the following control card:
SORT FIELDS=(4,5,CH,A,9,20,CH,A)

The data from position 9 to 20 has an alphanumeric character '/' which can appear at any position between 9 to 20. In my o/p file, I am getting data as this
Code:

0010000214106348/001 
0010000214150387/003 
00100002401157157/002
0010000241685291/000 
001000029718727/001   
001000029833591/001   
001000029833682/001   

If you see the 3rd row, the value 401157157/002 should be considered > than the ones after that.
How can this be achieved in ICETOOL?

Thanks,
Priyaranjan
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Fri Feb 21, 2014 11:56 am    Post subject: Reply with quote

priyaranjan.mishra,

If you only have numeric data apart from the "/" then use UFF format for sorting.

Code:

//SYSIN    DD *               
  SORT FIELDS=(4,05,CH,A,     
               9,20,UFF,A)   
//*


This will result in the following output

Code:

001000029718727/001     
001000029833591/001     
001000029833682/001     
0010000214106348/001   
0010000214150387/003   
0010000241685291/000   
00100002401157157/002   

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
priyaranjan.mishra
Beginner


Joined: 21 Jan 2008
Posts: 17
Topics: 9

PostPosted: Mon Feb 24, 2014 4:52 am    Post subject: Reply with quote

Thanks a lot Kolusu...the solution works.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group