Page 1 of 1

Retrive a vlaue from one job and use that in a different job

Posted: Thu Aug 18, 2011 7:14 am
by hi_manoj
Retrive a vlaue from one job and use that in a different job while reading from source, In detail

I am reading from a table (oracle) and writing to a dataset (or if suggested can be a seqential file). From table i am select just one column for a max(vlaue) in the where condition and it is retrieving 1 row. so just one value is getting written to the dataset

I want to use that value in a different job while reading from a table. Like when querying the source table in the other job i want to use it in where condition.

select .... where column=<value>

I know we can do this with lookup stage and UNIX script but i want to know is there any why to do this with parameter.

Please suggest.

Posted: Thu Aug 18, 2011 7:29 am
by chulett
Put the value in a flat file. In a Sequence job, read the file for that value and pass it as a job parameter to the job that needs it. Use it in your where clause enclosed in hash tags. Or use a Server job for the first task, save the value in USERSTATUS and then use that mechanism to pass the value to the next job (saves an intermediate step).

Posted: Thu Aug 18, 2011 7:31 am
by arvind_ds
Put both the jobs in a job sequence. Store the value of the max column in a sequential file in your first job and then read the sequential file by using a execute command and store the previously read value in a variable activity stage.Then place your second job here in the sequence and pass the value of the variable activity stage to the next job which should be parameterised for desired value.

HTH