Reg - Initialize Env variables inside job

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
ragavendradineshdsx
Participant
Posts: 15
Joined: Sat Nov 14, 2009 3:38 am

Reg - Initialize Env variables inside job

Post by ragavendradineshdsx »

Hi all,

I have a requirement in my job where i need to re-initialize an environment variable/job parameter inside a job. I mean, in the xformer stage based on a IF condition, i need to re-initialize a env variable which is already been defined. Let me know if this requirement is possible by any means.
Thanks & Regards,
Ragavendra Dinesh C
veerabusani185512
Participant
Posts: 11
Joined: Fri Jan 30, 2009 3:21 am

Post by veerabusani185512 »

Use Parameter sets in job....Parameters of paramter sets can be updated using Datastage job ....For every parameter set there will be a file which will have paramter name and Parameter value(Which will be default)..If your job can update this file then we can pass that parametr to next job run time
ragavendradineshdsx
Participant
Posts: 15
Joined: Sat Nov 14, 2009 3:38 am

Post by ragavendradineshdsx »

Hi veera,

i think, parameter sets are used mainly for defining some default values like username/pwd for connecting to databases (if i'm not wrong). but my requirement is, suppose if i have a env var $APT_DISABLE_COMBINATION, inside the xformer, based on IF condition, i should set $APT_DISABLE_COMBINATION=TRUE else $APT_DISABLE_COMBINATION=FALSE. is this possible?
Thanks & Regards,
Ragavendra Dinesh C
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Re: Reg - Initialize Env variables inside job

Post by jwiles »

If you mean to change an environment variable value while the job is running and expect other stages in the job to see the changed value...no, that cannot be done, especially in a parallel job.

If you mean to just update the variable for use in a later run of that job and/or other jobs then use a parameter set or a text file from which that value could be picked up by a sequencer or some other means.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
Post Reply