How to change the Environment variable in Server 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
vinbhate
Participant
Posts: 36
Joined: Tue Jul 17, 2007 12:51 am
Location: India-Mumbai

How to change the Environment variable in Server job

Post by vinbhate »

Hello,
Can anybody suggest how to change Environmental varaible through Job parameter
for Eg: 'StartDate' i have declared the user defined environment variable and assign YYYYMMDD
now when in job parameter $SRDPARAMETER am assigning $PROJDEF

Now my requirement is through Job parameter i want to update date in Environment variable'START DATE'

Warm Regards,
Vinita Bhate
Regards and Thanks,
Vinita Bhate
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So... you want to change the actual value outside of your job of an environment variable? And persist it after the job completes? And what do you mean by 'through job parameter'? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Your problem is that the shell in which the job runs is closed when the job finishes. So, while you could generate a new value for an environment variable (in an after-job subroutine), this would be destroyed when the environment (that is, the shell) is closed. No shell can update an environment variable in its parent shell.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

You might find a better answer for your issue if you tell us what you are trying to acomplish, who knows people here might have other ways to get it done.
IHTH (I Hope This Helps),
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
Post Reply