DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
sanju4truefrnds
Participant



Joined: 14 Oct 2010
Posts: 3
Location: SYDNEY
Points: 24

Post Posted: Thu Oct 14, 2010 11:45 pm Reply with quote    Back to top    

Hi ,

I would like to know how to declare the global variables and how we can use them in Datastage into expressions.

Actually I need to declare variables based on Oracle SQL Table data.
So wanted to know where we can write the query to declare the global variable?

Would appreciate the inputs !

Thanks !!
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42671
Location: Denver, CO
Points: 219762

Post Posted: Fri Oct 15, 2010 6:33 am Reply with quote    Back to top    

What version of DataStage? What operating system? Parallel or Server?

_________________
-craig

And I'm hovering like a fly, waiting for the windshield on the freeway...
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54287
Location: Sydney, Australia
Points: 294450

Post Posted: Fri Oct 15, 2010 3:20 pm Reply with quote    Back to top    

And what do you mean by "global"? That is, what scope do you see these variables having - for example within a sequence, within a project or across multiple projects?

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
sanju4truefrnds
Participant



Joined: 14 Oct 2010
Posts: 3
Location: SYDNEY
Points: 24

Post Posted: Sun Oct 17, 2010 10:09 pm Reply with quote    Back to top    

Hi,

We have Datastage 8.1 Server Edition, And it is on Windows Server 2003.

By Global variables I mean to say,
It can be used across whole of the sequence Job.

Thanks & Regards,
Sanjeev
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54287
Location: Sydney, Australia
Points: 294450

Post Posted: Mon Oct 18, 2010 1:12 am Reply with quote    Back to top    

Declare them in a User Variables activity - they remain accessible to any activity downstream (that is, linked via any pathway to the User Variables activity).

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
sanju4truefrnds
Participant



Joined: 14 Oct 2010
Posts: 3
Location: SYDNEY
Points: 24

Post Posted: Mon Oct 18, 2010 4:29 pm Reply with quote    Back to top    

Hi,

Thanks for the response.

I thought in the same way, But I am stuck in User variable activity that How a variable can be declared from database oracle table.

In brief, I wanted to declare the variable and assign the value to it by using some sql query on database table. But i am not able to find any function or utility where i can write SQL queries directly to access the database tables.

Thanks & Regards,
Sanjeev
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54287
Location: Sydney, Australia
Points: 294450

Post Posted: Tue Oct 19, 2010 12:14 am Reply with quote    Back to top    

Use a Job activity upstream of the User Variables activity. In that Job activity run a job to fetch the value from Oracle and park it somewhere, for example in the job's user status area or in a file ...

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours