User VAriable Activity
Moderators: chulett, rschirm, roy
User VAriable Activity
Hi All,
I have defined multiple User Variables in my sequence.I am getting some parameters from Hash Table using UtilityHashLookup. I have a User variable "A" which is extracted from Hash table and its value is abc/def/ghi.
I have another User variable "B" and its avlue is abc/def/ghi/jkl/mno/.
Since part of "B" has A's value,I need to concatenate A with B.Can anyone please give me the Correct format of Concatenating the User Variable "A" with hardcoded value of "B".
So that the output of "B" would be abc/def/ghi/jkl/mno
Thanks in Advance!
I have defined multiple User Variables in my sequence.I am getting some parameters from Hash Table using UtilityHashLookup. I have a User variable "A" which is extracted from Hash table and its value is abc/def/ghi.
I have another User variable "B" and its avlue is abc/def/ghi/jkl/mno/.
Since part of "B" has A's value,I need to concatenate A with B.Can anyone please give me the Correct format of Concatenating the User Variable "A" with hardcoded value of "B".
So that the output of "B" would be abc/def/ghi/jkl/mno
Thanks in Advance!
Hi,
It looks very simple.But it doesn't work and I tried lot of other combinations.I In User Variable activity,under Name tab for Variable "B" the expression which I gave was 'A':'/jkl/mno/pqr'.The outbound that I get is A/jkl/mno/pqr.
But the Value of variable A is not Concatenated.
I even tried A:'/jkl/mno/pqr' but it says Variable 'A' not defined.
It is not that I don't know to use concatenation but I wanted to use a varibale within an expression for another variable.
Thanks!
It looks very simple.But it doesn't work and I tried lot of other combinations.I In User Variable activity,under Name tab for Variable "B" the expression which I gave was 'A':'/jkl/mno/pqr'.The outbound that I get is A/jkl/mno/pqr.
But the Value of variable A is not Concatenated.
I even tried A:'/jkl/mno/pqr' but it says Variable 'A' not defined.
It is not that I don't know to use concatenation but I wanted to use a varibale within an expression for another variable.
Thanks!
Inside the User Variable Activity,I want to Concatenate One User Variable with the expression value for another User Varaible.
Inside User Variable Activity I have two Variables :
1.ETLROOTDIR (The expreesion for this variable is extracted from hashtavle using UtilityHashLookup ) which is /mdm/dev/datastage/customer(output value).This will differ based on the ENV Parameter that we pass.For TEST Env it would be /mdm/test/datastage/customer.
2.ShFileDir (The expression for this is hard coded as /mdm/dev/datastage/customer/SCRIPTS/OUTBOUND.I thought instead of hardcoding the entire expression,I would use ETLROOTDIR variable for '/mdm/dev/datastage/customer/' and concatenate with '/SCRIPTS/OUTBOUND')
Right now,I had to manually Change ShFileDir expression whenever we migrate from one environment to another environment.So that is why I thought I would make use of ETLROOTDIR in ShFileDir which is extracted appropriately based on each environment .
So IF I concatenate ETLROOTDIR with ShFileDir then I dont have to manually change the expression value for ShFileDir in each environment
Inside User Variable Activity I have two Variables :
1.ETLROOTDIR (The expreesion for this variable is extracted from hashtavle using UtilityHashLookup ) which is /mdm/dev/datastage/customer(output value).This will differ based on the ENV Parameter that we pass.For TEST Env it would be /mdm/test/datastage/customer.
2.ShFileDir (The expression for this is hard coded as /mdm/dev/datastage/customer/SCRIPTS/OUTBOUND.I thought instead of hardcoding the entire expression,I would use ETLROOTDIR variable for '/mdm/dev/datastage/customer/' and concatenate with '/SCRIPTS/OUTBOUND')
Right now,I had to manually Change ShFileDir expression whenever we migrate from one environment to another environment.So that is why I thought I would make use of ETLROOTDIR in ShFileDir which is extracted appropriately based on each environment .
So IF I concatenate ETLROOTDIR with ShFileDir then I dont have to manually change the expression value for ShFileDir in each environment
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
A User Variables activity derivation can not access other variables in the same User Variables activity. I don't like it either (or the need to add a row to the grid manually) but that's how things are. You need a second, downstream, User Variables activity that can use the variables from the first.
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.