Page 1 of 1

passing User defined Env variable in dsjob -run

Posted: Sat Jul 05, 2008 11:03 pm
by Scope
hai

we have developed job sequencer with 5 parameters $userid,$password,schema,database,filepath.

$userid and $password are user defined environmental variables in Devlopment project.

we moved code to new devlopment server and created $userid and $password in new project
and assigned new userid and password.

we running job through dsjob command as follow

dsjob -run -param pdwschma=xxxx -param pdwdb=xxxx,-param filepath=/home/dev/

above command working fine in old Env.

but In new Env. job sequencer taking old Environment userid,password

i would like to know ,whether i have to pass User Defined Env. variable in dsjob -run command.

how to pass User defined Env variable in dsjob -run

Please Advise

Posted: Sun Jul 06, 2008 6:31 am
by chulett
How did you define the Environment Variables in your job? Did you set their default value to $PROJDEF? I would guess not if they are still using the "old" values.

Posted: Mon Jul 07, 2008 6:42 pm
by keshav0307
Because you are not passing the userid and password parameter in the new environment

you have defined these parameters:
$userid,$password,schema,database,filepath.
but not passing value for the parameter userid, password
dsjob -run -param pdwschma=xxxx -param pdwdb=xxxx,-param filepath=/home/dev/

Posted: Mon Jul 07, 2008 8:19 pm
by chulett
Shouldn't have to. Properly set up, they will automatically be picked up from the environment and the environment variables will be specific to the project.

Posted: Mon Jul 07, 2008 8:35 pm
by keshav0307
that means what do you see when you echo $userid $password

Posted: Mon Jul 07, 2008 8:35 pm
by rleishman
Don't have DS at the moment, but from memory, dont you have to specify -local and execute from the PROJECT directory to retain $ENV values from the current environment?

Posted: Mon Jul 07, 2008 8:42 pm
by chulett
Yes, ones established in the user's environment outside of what the Project thinks exist. We just had a longish discussion of the need and the -local option, and that was put forth as the answer when a Project defined variable was overwriting a user level one and the poster want the user one to survive.