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 !!
Declare/Use of Variables from SQL Oracle Table data?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3
- Joined: Thu Oct 14, 2010 11:27 pm
- Location: SYDNEY
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 3
- Joined: Thu Oct 14, 2010 11:27 pm
- Location: SYDNEY
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 3
- Joined: Thu Oct 14, 2010 11:27 pm
- Location: SYDNEY
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
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
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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. The User Variables activity can then assign a value to the variable by accessing that value.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.