Passing parameters to the query read from a file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
harikhk
Participant
Posts: 64
Joined: Tue Jun 04, 2013 11:36 am

Passing parameters to the query read from a file

Post by harikhk »

Hi,

Below is my requirement.

Execute a query by reading the query from a file in DB2 connector stage and writing to a sequential file.
But the catch is I have a where clause in the select query and pass parameters at run time to this where clause.
For example : where search_column like #PARAM#

Could anyone help me how can I implement this passing parameters to the query read from a file
I am not sure if we can do this in data stage.

Any suggestions or alternate approaches on this could be a great help.
Thanks,
HK
*Go GREEN..Save Earth*
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You can't, at that point the parameters are just text. You need to build the file on the fly with the parameter values substituted in, ready to go.
-craig

"You can never have too many knives" -- Logan Nine Fingers
harikhk
Participant
Posts: 64
Joined: Tue Jun 04, 2013 11:36 am

Post by harikhk »

Thanks Craig
Thanks,
HK
*Go GREEN..Save Earth*
Post Reply