Page 1 of 1
Passing values fron one job to other
Posted: Wed Jul 20, 2005 10:25 am
by vinaymanchinila
Hi,
I have a requirement, where my First job gives me a time stamp. Now I need to pass this on to the Second job , where it wuill be used in the ORA stage Query .
How do we go about this, thanks
![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
Posted: Wed Jul 20, 2005 10:28 am
by Sainath.Srinivasan
Either store it in a file and retrieve later or use status and sequencer to pass the values to next job.
Posted: Wed Jul 20, 2005 10:32 am
by vinaymanchinila
In my second job I am using an Oracle stage and it needs this date for the Join condition.
How do I do it in a seq?
Thanks for your time.
Posted: Wed Jul 20, 2005 10:48 am
by vinaymanchinila
Hi
Any help!
Re: Passing values fron one job to other
Posted: Wed Jul 20, 2005 11:13 am
by sumitgulati
vinaymanchinila wrote:Hi,
I have a requirement, where my First job gives me a time stamp. Now I need to pass this on to the Second job , where it wuill be used in the ORA stage Query .
How do we go about this, thanks
![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
Hi Vinay,
Two ways to do it:
1) Store the date in a hash file in first job. Read the hash in the sequencer using UtilityHashLookUp and pass the date to the second job.
2) From a Transformer Stage of the first job call the second job using UtilityRunJob and pass the date parameter value.
Hope this helps
-Sumit
Posted: Wed Jul 20, 2005 11:25 am
by vinaymanchinila
hi,
Thanks a lot, going with the first option, and have stored the date in the hash file.
1)Now how do I use the UtilityHashLookUp(HashName,'Value',1) in the seq
2) How do I pass this value to the second job activity.
I was planning on writing a routine which reads this hash file, I have only 1 value in the hash file.
Posted: Wed Jul 20, 2005 11:39 am
by sumitgulati
vinaymanchinila wrote:
1)Now how do I use the UtilityHashLookUp(HashName,'Value',1) in the seq
In the hash file define two colums DummyKey and Date. In Job 1 hardcode the value of Dummy Key to 1 and pass your date value to column Date. In the sequencer Call UtilityHashLookUp using RoutineActivity Stage. It asks for three arguments values. Use the following:
Arg1 - your hash file name within quotes
Arg2 - 1
Arg3 - 1
The output of the routine activity stage would be the date value. Now call Job 2 from the sequencer passing the return value from the Routine Activity Stage to the job.
2) How do I pass this value to the second job activity.
You can read help about this routine. As far as I remember you can pass the values to the parameters using pipe (|) delimited string.
Regards,
-Sumit
Posted: Wed Jul 20, 2005 11:54 am
by vinaymanchinila
Got it with this routine
Thanks!