Need to pass a parameter across all jobs

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
xch2005
Participant
Posts: 85
Joined: Fri Apr 29, 2005 3:13 am
Location: India

Need to pass a parameter across all jobs

Post by xch2005 »

Hi,

I have 10 jobs to be run in parallel and need to pass a value to a parameter from the sequence job which is in all jobs ie. in runtime.

eg. PR_DATE needs to have current_date -1 in all the jobs.
Is there a way how this can be acheived?

Thanks for your time.

Thanks
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

If I understand your question (let me restate to be clear)... You have a job sequence running 10 jobs. You need to set a parameter to a value and then pass that value to all 10 jobs.

If that is the case, then in the job sequence setup a "user variable" using the User Variable Activity stage first (before the jobs).

Inside the UVA stage, click on the User Variables tab and then right-click on the blank area and select "add row". Give your variable a name and then set the expression to Date() -1.

If your UVA stage is called SetVar and your actual variable is called Yesterday (for example), then you can use it to set the appropriate parameters in your jobs. It would show up under "Activity Variables" as SetVar.Yesterday
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Post by synsog »

Thanks Andy, this helps.
xch2005
Participant
Posts: 85
Joined: Fri Apr 29, 2005 3:13 am
Location: India

Post by xch2005 »

It works for me now.

Andy, thanks a lot.
fmou
Participant
Posts: 124
Joined: Sat May 28, 2011 9:48 pm

Post by fmou »

in the job sequence setup a "user variable" using the User Variable Activity stage first
THe OP was on DataStage Release: 7x. Is such User Variable Activity stage available in DataStage 7?

I searched trough the Parallel Job Developer's Guide, Version 7.5.1, but didn't find a match for "User Variable".

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

Post by chulett »

Yes, it exists. It's a Sequence job stage.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I believe that the User Variable activity was introduced in version 8.x.

But a version 7.x solution would involve creating a parameter in the sequence itself, and passing that to the ten job activities.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No, I've used it back on a 7.5.1a system, so I'd say in the 7.5 release.
-craig

"You can never have too many knives" -- Logan Nine Fingers
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post by zulfi123786 »

fmou wrote:I searched trough the Parallel Job Developer's Guide, Version 7.5.1, but didn't find a match for "User Variable".
Search for the same in "DataStage Designer Guide , Version 7.5.1"
- Zulfi
fmou
Participant
Posts: 124
Joined: Sat May 28, 2011 9:48 pm

Post by fmou »

Thanks zulfi,

User Variables Activity Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-36
Post Reply