getting the value from an environment variable

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
jasper
Participant
Posts: 111
Joined: Mon May 06, 2002 1:25 am
Location: Belgium

getting the value from an environment variable

Post by jasper »

hi,

We have 2 requierments which we need to combine
- shield off all DB-paswords from everyone within datastage
- create a Job to do an oracle materialized view refresh on all databases.


What we were planning to do:
- create structured environment variables (example for a database called cust we will have 3 variables: CUSTDB,CUSTUSER,CUSTPWD). the CUSTPWD will be encrypted (we'll ask the DBA to fill it in to shield it of from everyone)

-create a job to do the materialized refresh. This will typically have as parameters DB,USER and PWD. depending on a variable these need to get the values from one DB.
We can use unix-code before calling dsjob, or use logic inside a datastage workflow before calling this job to do this trick.

At this point we can get the value for non-encrypted values trough a uservariables stage where we do:
Trim(executeUnixCommandReturnOutput("echo $CUSTUSER"),@FM)

($CUSTUSER is then calculated before this, it's actually a concatenation of param1 and USER)
This doesn't work for encrypted variables however.


The only way we see now is to add all variables to this flow and then take out the correct one. This would lead to recompile for every new source, which is not in synch with the multifunctional job we want to create.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Investigate using a Parameter Set, in which you can specify different files to be read to provide the values.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jasper
Participant
Posts: 111
Joined: Mon May 06, 2002 1:25 am
Location: Belgium

Post by jasper »

Ray,

One of the requierments is to keep the paswords hidden. How can we make sure nobody is able to read them if they are in a file?
mahadev.v
Participant
Posts: 111
Joined: Tue May 06, 2008 5:29 am
Location: Bangalore

Post by mahadev.v »

Passwords are encrypted in the file. You cannot directly read from the file. Other variables values Yes, passwords No.
"given enough eyeballs, all bugs are shallow" - Eric S. Raymond
Post Reply