How to get the Value in the Table to pass as parameter

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
Narayana
Participant
Posts: 16
Joined: Fri Mar 30, 2007 9:25 am

How to get the Value in the Table to pass as parameter

Post by Narayana »

Hi,

I have to capture a value in the table with 3 coluomns and pass the max value as parameter.


Can you please tell me how to proceed.

Thanks :shock:
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Post by ag_ram »

Let getting the maximum value from the table be in the first Job and USERSTATUS will be useful in passing that value to next Job as Job parameter.

Searching "UserStatus" will give you more ideas of it.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or land the value and then cat it into the Initial Value of a stage variable. Depends on where you need to use it in your job, it will need to be a job parameter to use in source SQL but a stage variable can be used without needing a Sequence (or other job control) to arrange the passing of same.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Narayana
Participant
Posts: 16
Joined: Fri Mar 30, 2007 9:25 am

Post by Narayana »

Can you tell me how to cat the value to the paramter value
Narayana
Participant
Posts: 16
Joined: Fri Mar 30, 2007 9:25 am

Post by Narayana »

Hi Chulett,

Can you tell me how to cat the value to the Stage Variable

regards,
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You'd need a routine to execute the UNIX 'cat' command and pass back the result. You would call it in the Initial Value field of the stage variable. Now, Server forum so Server answer. Someone else would have to note exactly how one would do this in a PX transformer.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply