Sorting data using 'Filter' command

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
yaminids
Premium Member
Premium Member
Posts: 387
Joined: Mon Oct 18, 2004 1:04 pm

Sorting data using 'Filter' command

Post by yaminids »

Hello friends,

I am trying to sort data using 'Filter' command for the first time. The input sequential file has 40 columns and I am trying to sort the file on 21st, 22nd and 23rd columns.

Can anyone explain to me how to specify the sort statement in 'Filter' segment in the Sequential file stage.

Thanks a lot in advance
-Yamini
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Did you try searching first before asking? A quick check shows 27 hits in this forum using sort and filter as keywords. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ahmediftikhar
Participant
Posts: 22
Joined: Thu Jul 29, 2004 8:10 am

Post by ahmediftikhar »

Hello Yamini

Try this out in the filter command:

sort -t "," -k 21,23 <Filename>

where "," is the delimeter and 21,23 is the column number from 21st to 23rd to be sorted.

Hope this helps

Ahmed
yaminids
Premium Member
Premium Member
Posts: 387
Joined: Mon Oct 18, 2004 1:04 pm

Sorting data using 'Filter' command

Post by yaminids »

Thank you Ahmed
Post Reply