Parameter question

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
JPalatianos
Premium Member
Premium Member
Posts: 306
Joined: Wed Jun 21, 2006 11:41 am

Parameter question

Post by JPalatianos »

Hi,
I have a UDB table that users will be updating regularly and I need to extract a single date from. This date will end up being used in the where clause of a Mainframe DB2 query(90 million rows total). Look-up doesn't seem practical since my result set will only be ~100k rows.
Is there any way to grab the date via an ODBC stage, store it as a parameter and use it in the subsequent ODBC stages where clause?
Thanks - - John
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

Sure you can. Search for UtilityHashLookUp and how to use it to pass date as a parameter to subsequent jobs. I don't have enought time to put it in detail. So give you a start, you will have to create a seperate job to extract the date from 90 million rows table and store it in a hashed file. Then you can use the routine mentioned above in a JobSequence where in you will pass the date as a parameter to your Job. All you willneed in your job is to create a parameter say LastDate and use it in your Sql query in the ODBC stage. Now in your Job Activity stage in the job sequence, you will use UtilityHashLookUp routine to get the date and pass it to this job(into your quer).

HTH

P.S. It works in 7.5. Which version are you on?
Kris

Where's the "Any" key?-Homer Simpson
JPalatianos
Premium Member
Premium Member
Posts: 306
Joined: Wed Jun 21, 2006 11:41 am

Post by JPalatianos »

Thanks Kris!!!
I am running 7.5 and the UtilityHashLookUp utility worked perfectly.
Post Reply