Reading Environment Variable using routine

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
bgs_vb
Premium Member
Premium Member
Posts: 79
Joined: Mon Jan 02, 2006 5:51 am

Reading Environment Variable using routine

Post by bgs_vb »

Hi ,
I have a requirement to load multiple target tables using a single job . I am using Loop in sequence for this and have created a file list to pass necessary database tablename values to it .
(FileList as follow:
SRCNAME,TGT_TABLE_NAME,TGT_CONN,TGT_USERNAME)

I am facing issue with passing password .As it is not allowed to pass password through file and am unable to pass encrypted value.

Can we get password Environment variable value using routine and pass it in sequence .My idea is to write a routine with conditional statements as

if varconnection="TGTDB1" then GetPassword ($TGTDB1)
if varconnection="TGTDB2" then GetPassword ($TGTDB2)

and i can pass this varconnection as an argument to routine .
Please help me in achieving this .
Post Reply