Dynamic parameter passing to OCI 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
nchincholikar
Participant
Posts: 21
Joined: Sun Jul 18, 2004 11:32 pm

Dynamic parameter passing to OCI Stage

Post by nchincholikar »

Hi everybody,

We have 2 hash files.And 1 Oracle Stage.

I want to pass Hash1 Arr_Id and Hash2 Bill_date to Oracle Oci stage as a dynamic parameter.

So query will be like below

Select sum(Tram_amt)
from t1
where arr_id=&Hash1_Arr_id
and dt=&Hash2_Bill_date

Thanks & Regards,
Narendra
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Best will be to split them as 2 jobs. First obtaining the values and the next passing to OCI as params. You may need a third to cover both.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

So the query will look like:

Code: Select all

Select sum(Tram_amt) 
from t1 
where arr_id=#Hash1_Arr_id# 
and dt='#Hash2_Bill_date#' 
You can use job parameter references even in generated SQL. You can also use aggregate functions such as SUM (in Derivation in the Columns grid) in generated SQL.
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