Page 1 of 1

How to Pass dataset field value to job parameter/parameter s

Posted: Tue Sep 23, 2008 10:14 am
by Chandrathdsx
I have a job1 that retrives a control parameter (region name) from a table (teradata) and writes it to a dataset.
My job2 has to read the region name from the dataset created in the job1 and pass it to the job2 as parameter in SQL selection criteria in teradata connector stage as parameter.

Example:
Job1 output dataset: Region name = USA.
Job2 teradata connector stage has SQL select * from Customer_sales where Region = '#Region name#'
here in the job2 the 'region name' parameter to be passed from the job1 dataset value 'USA'.

Can anyone please help me on how to implement this in information server parallel job?

Thank you for the help.

Posted: Tue Sep 23, 2008 10:19 am
by chulett
Write it to something... simpler, like a flat file. Then you have many more options re: retrieval. For example, you could cat the value, capture that in a Sequence job and then pass that output easily to any downstream job parameter.

Posted: Wed Sep 24, 2008 5:38 am
by deepticr
Hi,

Probably you can use the routine DSSetUserStatus. This routine takes a single argument as input and assigns the input value to $UserStatus variable. So, in your case $UserStatus can be set with the value of region code from your dataset.

Next this $UserStatus can be passed as a value to the #RegionCode# parameter defined in your next job. A sequencer can call these two jobs.

I hope this answers your question