Hi,
We have a RCP jobs which is connecting to multiple source systems. We have created the Parameterset in the job and the values are hardcoded(DSN,USER,PASSWORD etc).
It has been decided to remove the hardcoded values from the parameterset.
We tried few mentioned setps
Defined the environment variables as
$Tuser=Tax
$Ruser=Wax
Created Parameter Set
Variable name =Username
Values
t1 $Tuser
t2 $Ruser
But when I am reading the values in my job and passing t1/t2 of parameterset, I am getting the output as $Tuser or $Ruser instead of Tax and Wax..
Please suggest
Regards
Neeraj
Passing Environment variable in Parameters
Moderators: chulett, rschirm, roy
The parameter set you are using does not know what $Tuser is in your context. If $Tuser was one of the parameters of your parameter set, you could set the value to $PROJDEF and the parameter set would take the value defined on the respective project at runtime.
But the way you defined it, Username is simply set to the string "$Tuser" or "$Ruser" at runtime, depending on the value-file you choose. DataStage does not recognize this string to be a parameter defined in the project.
If you absolutely have to find a different solution than to store the "hardcoded" values in the value-files directly, you'll have to find a different approach to this topic altogether.
But using the value-files is one of the best solutions available in DataStage, because by using them you avoid having to recompile your jobs when passing them to another project.
But the way you defined it, Username is simply set to the string "$Tuser" or "$Ruser" at runtime, depending on the value-file you choose. DataStage does not recognize this string to be a parameter defined in the project.
If you absolutely have to find a different solution than to store the "hardcoded" values in the value-files directly, you'll have to find a different approach to this topic altogether.
But using the value-files is one of the best solutions available in DataStage, because by using them you avoid having to recompile your jobs when passing them to another project.
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
There are the grateful those are happy." Francis Bacon
-
- Participant
- Posts: 117
- Joined: Wed Feb 06, 2013 9:24 am
- Location: Chennai,TN, India
Thanks for the reply...
As mentioned in my post, I am using RCP Job and have to pass the database credentials at run time..That is the reason we used parameterset. But due to process point of view, we have to either delete the patameterset or parameterize the parameterset...
Design change in the jobs will have a big impact.
Please suggest the best approach.
As mentioned in my post, I am using RCP Job and have to pass the database credentials at run time..That is the reason we used parameterset. But due to process point of view, we have to either delete the patameterset or parameterize the parameterset...
Design change in the jobs will have a big impact.
![Sad :(](./images/smilies/icon_sad.gif)
Please suggest the best approach.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: