Pass the value into dsjob command
Posted: Fri May 11, 2012 1:23 pm
Hi
I would like to pass the value into dsjob command via unix script.
I am reading the values from a.txt file . a.txt file data looks like
year|design
2009|4 way
2010|2 way
2011|3 way
Inside unix script I have assgined the values as follow
//---------------------------------------------------------
reading for the file in loop
year=`echo $READ_LINE | cut -d "|" -f1`
design=`echo $READ_LINE | cut -d "|" -f2`
echo $year , $design
dsjob -run -mode NORMAL -warn 0 -param YEAR=$year -param DESGIN=$desgin -wait -jobstatus <projectname> file_Extract_test
//---------------------------------------------------------------------------
I am getting Invalid arguments: dsjob -run error.
But when I run the dsjob from command line and it works fine without issue but passing parameter is giving error even via command line too.
working one
---------------
dsjob -run -mode NORMAL -warn 0 -param YEAR=2009 -param DESGIN="$desgin4 way" -wait -jobstatus <projectname> file_Extract_test
Not working
------------------
echo $year , $design
dsjob -run -mode NORMAL -warn 0 -param YEAR=$year -param DESGIN=$desgin -wait -jobstatus <projectname> file_Extract_test
Is there is any format to send value like "4 way"?
Thanks
Man
I would like to pass the value into dsjob command via unix script.
I am reading the values from a.txt file . a.txt file data looks like
year|design
2009|4 way
2010|2 way
2011|3 way
Inside unix script I have assgined the values as follow
//---------------------------------------------------------
reading for the file in loop
year=`echo $READ_LINE | cut -d "|" -f1`
design=`echo $READ_LINE | cut -d "|" -f2`
echo $year , $design
dsjob -run -mode NORMAL -warn 0 -param YEAR=$year -param DESGIN=$desgin -wait -jobstatus <projectname> file_Extract_test
//---------------------------------------------------------------------------
I am getting Invalid arguments: dsjob -run error.
But when I run the dsjob from command line and it works fine without issue but passing parameter is giving error even via command line too.
working one
---------------
dsjob -run -mode NORMAL -warn 0 -param YEAR=2009 -param DESGIN="$desgin4 way" -wait -jobstatus <projectname> file_Extract_test
Not working
------------------
echo $year , $design
dsjob -run -mode NORMAL -warn 0 -param YEAR=$year -param DESGIN=$desgin -wait -jobstatus <projectname> file_Extract_test
Is there is any format to send value like "4 way"?
Thanks
Man