Passing run time variables to ODBC 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
yaminids
Premium Member
Premium Member
Posts: 387
Joined: Mon Oct 18, 2004 1:04 pm

Passing run time variables to ODBC stage

Post by yaminids »

Friends,

Is there a way to pass variables during the run time to the ODBC stage?

My current project requires me
1) To get a value from the log table and pass this to the next stage (ODBC.)
2) Use the above value in the WHERE clause of the 2nd ODBC stage to retrieve data from the source

1st ODBC(get the value from log table) ==>2nd ODBC (use the value and retrieve data from source)

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

Post by chulett »

Not directly in a single job, no.

Typically, that '1st ODBC' work would be in one job and the results would be landed somewhere, say in USERSTATUS. Then a Sequence job would read the value from user status and assign it to a Job Parameter in a second job where the '2nd ODBC' would use it in its where clause.

In one server job, the 2nd ODBC stage could insert the data from the 1st stage into a temp/work table and then the output link on the 2nd ODBC stage could join to that work table, which in essence serves as your 'where clause' constraint.

A couple of ways off the top of my head.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply