passing env variable as parameter thru shell script

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
Rick001
Participant
Posts: 30
Joined: Thu Mar 22, 2007 5:18 pm

passing env variable as parameter thru shell script

Post by Rick001 »

I have added environment variable $APT_CONFIG_FILE in job parameters, it has got the path for the default.apt config file by default. I would like to pass different config file from the unix shell script using dsjob -run -param command. The dsjob code looks like this

dsjob -run -param '$APT_CONFIGFILE_FILE=/fs/sdfds/dfsd/dfd.apt' <project> <jobname>

If I try to run it is not giving any error at command line, moreover it is giving statuscode=0 and job has run successfully. But I see in the director job has got aborted saying that Fatal error: cannot continue without the configuration file. Can anyone tell me why it is not parameter given thru script. Do I need to change the default value of that variable in the job properties?
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Get rid of the dollar sign.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Rick001
Participant
Posts: 30
Joined: Thu Mar 22, 2007 5:18 pm

Post by Rick001 »

If I get rid of $ it is giving error
status code = -3 DSJE_BADPARAM
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Ok nevermind. Does the config file exist. Does it have read permissions to your id?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Rick001
Participant
Posts: 30
Joined: Thu Mar 22, 2007 5:18 pm

Post by Rick001 »

Problem got solved , one of the words in the path was spelled incorrectly. Now it is working fine.
singhald
Participant
Posts: 180
Joined: Tue Aug 23, 2005 2:50 am
Location: Bangalore
Contact:

Post by singhald »

Hi Rick,

could you please tell how did get rid off $ sign.

Regards
Regards,
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That was some bad advice that was withdrawn. If you are having a problem, please start your own thread on the subject.
-craig

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