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

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
Chandrathdsx
Participant
Posts: 59
Joined: Sat Jul 05, 2008 11:32 am

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

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
deepticr
Participant
Posts: 32
Joined: Wed Mar 19, 2008 7:01 am
Location: Bangalore, India

Post 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
Post Reply