Key function

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
Peytot
Participant
Posts: 145
Joined: Wed Jun 04, 2003 7:56 am
Location: France

Key function

Post by Peytot »

Hi,

I need to do a lookup between a file and a Hash File on more fileds (6). If I use the standard technique, It's very long.
I know (but I don't remember) that DataStage have a function where I can concatenate all these fields in a new field (for my two files) and after in the transform, The lookup is faster.

Is anybody know this command?

Thank you for your help.

Pey
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not sure, but is the technique discussed in this post what you are thinking of? Or something you could use?

If you mean simply concatenating all of those fields together to build a 'psuedo' composite key, just use the standard colon concatenation operator. Throw in the NullToSpace() transform to handle any null fields that might exist. Or is this the standard technique that is 'very long' you mentioned? I wasn't sure if 'long' meant big in size or in execution time...
-craig

"You can never have too many knives" -- Logan Nine Fingers
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Hash files are very fast even with compound keys. All DataStage does is put a @TM between each key field so it is pretty much a concatenated field. @TM is a char(251).
Mamu Kim
Post Reply