More than one record from transform stage

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
rdy
Participant
Posts: 38
Joined: Wed Nov 05, 2003 2:40 pm

More than one record from transform stage

Post by rdy »

I'm using a transform with a sequential file input and ODBC lookup. I want to extract all the records in the ODBC that match the key value in the sequential file.

However, the transform currently grabs the FIRST record in the ODBC that matches, and not the rest.

I know there's a setting somewhere that says "grab all the matching records". Anyone know where that is?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You need to go to the Link Properties of the Transformer stage you are doing the lookups from. It is there on the Inputs tab that you'll find a check box for Reference Link with multi row result set.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sumitgulati
Participant
Posts: 197
Joined: Mon Feb 17, 2003 11:20 pm
Location: India

Post by sumitgulati »

Great chulet, I never knew about this option.

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

Post by chulett »

Applicable to both the ODBC and UV stages, by the way.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sumitgulati
Participant
Posts: 197
Joined: Mon Feb 17, 2003 11:20 pm
Location: India

Post by sumitgulati »

Yaa, and I guess Hash File always takes the last record.

-Sumit
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you're doing a lookup to a hashed file (even via a UV stage) using the key, then it returns "that" row, not the first, not the last. In hashed files (all UV tables are hashed files), the key is UNIQUE. :)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply