Sort comma delimited data



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Sort comma delimited data

Postby Subbarao » Mon Apr 07, 2014 1:17 pm

Hi All,

I want to sort a PS file, which is comma delimited file, Here is the sample data, and i want to sort according to the first column.

123456789,Aus,Jeffa,Sydney
12345,Texas,John Doe,San
234,NJ,Joe,Mexico
678892,IN,Abdul Dariff,Delhi

I should get,

234,NJ,Joe,Mexico
12345,Texas,John Doe,San
678892,IN,Abdul Dariff,Delhi
123456789,Aus,Jeffa,Sydney

Please gimme a JCL, Thank you in Advance.
Subbarao
 
Posts: 3
Joined: Wed Feb 19, 2014 10:54 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Sort comma delimited data

 

Re: Sort comma delimited data

Postby NicC » Mon Apr 07, 2014 1:31 pm

Please gimme a JCL

This is just plain rude - even with the 'please'. You are demanding that we do your work for you. The sort JCL is very simple and is shown in the manual which you can easily read. If, however, you are wanting sort control cards then you should show us what you have tried and how it did not give the results that you wanted. Also, for control cards you should have posted in the section of the forum applicable to your sort program. As control cards can vary between sort products you should be clear as to which product you use (hint: read the SYSOUT not the PGM=).

Also, when coding data, JCL, program code, control cards, anything requiring the preservation of format including spaces you must use the code tags.

I will move this to the DFSort part of the forum - if you are using another product then please let us know which and it will be moved there.
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

Re: Sort comma delimited data

Postby BillyBoyo » Mon Apr 07, 2014 2:28 pm

You should use PARSE, with FIXLEN for the maximum length of the first field, then extend your record temoprarily (in INREC) to include the PARSEd field at a fixed position, SORT on that new field, then remove the new field in OUTREC or OUTFIL.

It looks like you need right-aligned data for your sort, so look at JFY with SHIFT=RIGHT as well.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Sort comma delimited data

Postby steve-myers » Thu Apr 10, 2014 12:59 am

You are asking for the work product of a professional. Professionals expect to be paid. If you are interested in paying a professional, leave a message here and someone may contact you using the private mail facility of this forum. Please be patient; few people seem to be willing to pay, so it may be some time before a qualified professional willing to perform this task will read your post.
steve-myers
Global moderator
 
Posts: 1886
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: Sort comma delimited data

Postby skolusu » Thu Apr 10, 2014 3:54 am

Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post