Passing value to environmental 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
karthikraju
Participant
Posts: 24
Joined: Tue Jan 24, 2006 12:40 am

Passing value to environmental variable

Post by karthikraju »

I have 3 jobs. In my first job i do some calculation. If the result is say 1 then i run the second job with that value else i run the third job.

Can any one let me know how to pass the the value from a transformer stage to the environmental variable so that i can use it in the next job.
swades
Premium Member
Premium Member
Posts: 323
Joined: Mon Dec 04, 2006 11:52 pm

Post by swades »

why you want to pass value to environmental variables,
you can use DSRunJob in transformer to do this thing,
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

You dont need to go the "environment variable" route for this. Write your value to a file. Write a small routine that reads the contents of the file using DSExecute() by doing a cat. Call that routine in the job activity in the derivation of "a" job parameter.
This way whatever is present in the file, will now be the value of the job parameter which you can use in the job.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply