passing User defined Env variable in dsjob -run

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
Scope
Premium Member
Premium Member
Posts: 63
Joined: Wed Jun 06, 2007 6:38 am
Location: Chennai

passing User defined Env variable in dsjob -run

Post 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
Kumarez
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post 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/
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

that means what do you see when you echo $userid $password
rleishman
Premium Member
Premium Member
Posts: 252
Joined: Mon Sep 19, 2005 10:28 pm
Location: Melbourne, Australia
Contact:

Post 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?
Ross Leishman
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply