I'm executing a SQL statement in Unix shell script, which in turn calls a Datastage job. I want to connect to Db2 using login field values from Parameter set's environment variables. These environment variables have default value as $PROJDEF. I want to capture their value stored in a specific value file. Is it possible to extract these values in Unix shell script?
Since you are dealing with $PROJDEF, you'll have to retrieve the value from DSParams. Note that if the type is encrypted string (typical for database passwords), you will have to find a method to decrypt the string.
For decrypting the password field values-
Use echo #Parametername# in before or after job subroutine.
The value will be reflecting in the Director log.
The value displayed in the log is encrypted value for password. My requirement is that I need to use the password from environment variable and use it to connect to Db2 database in my shell script. You have any thoughts on how to achieve that?