Sort Hash Files

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

You mean to say you are trying to read Hashed file using UV stage in an order?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ztavoz
Participant
Posts: 2
Joined: Wed Mar 14, 2007 4:17 pm
Location: orizaba ver

Post by ztavoz »

kumar_s wrote:You mean to say you are trying to read Hashed file using UV stage in an order? ...
nop... i'm using the select tab -> output tab in the stage, to define the sort order...
but i donn't how to define the ascending o descending order...
Octavio Mtz
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

In Sort stage, you need to give the column name on which you going to sort.
Col1 a or Col1 ASC etc.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you are using a Hashed File stage to extract data from a hashed file - and it won't extract data from anywhere else - then on the Selection tab there are two fields.

Put your selection criteria in the top field

Code: Select all

Key > 0
Put your sorting criteria in the bottom, "other clauses" field

Code: Select all

BY Col1 BY col2
Note that column names are case sensitive.

To sort in descending order, replace

Code: Select all

BY 
with

Code: Select all

BY.DSND 
in either case.

Code: Select all

BY.DSND Col1 BY.DSND Col2
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

And don't forget that you only get access to the Selection tab for hashed fields that were created in an account. Or ones you've explicitly created a VOC record for.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

<Thinks>
What happens if you specify it as being in an account, edit the Selection tab, then switch it to a pathed hashed file?
</Thinks>

<Thinks>
Further research is clearly required.
</Thinks>
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

<Thinks>
Cheater, cheater, pumpkin eater.
</Thinks>
-craig

"You can never have too many knives" -- Logan Nine Fingers
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Methinks you'd be exploiting a GUI flaw to achieve the sorting using the BY DSND without using the Account based option. There's no guarantee this functionality would be supported in the future when they change the way the GUI works. They could go either way with it.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Well, someone out there has version 8.0. If "they" were going to change the way the GUI works, version 8.0 is the most likely candidate. Anyone (who has version 8.0, of course) want to test it?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Its better to 'shout out' as a new post so that 8.0 folks can see post headings and respond. IMHO.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply