ExecSH
Posted: Wed Apr 21, 2004 9:03 am
Hi
I am trying to use ExecSH in before job subroutine where i am calling a shell script which performs deletion of a million rows in a table x . When i was trying to execute the shell from datastage using ExecSH i am getting following error....... but shellscript works fine when i run from cmd line...
what might be the reasons for the error
jobtest1..BeforeJob (ExecSH): Error when executing command: "/Project/Source/xxx.ksh"
*** Output from command was: ***
DB="db2"
+ DB=db2
USERID="cooo"
+ USERID=cooo
PASSWD="xxx"
+ PASSWD=xxx
db2 "connect to $DB user $USERID using $PASSWD"
+ db2 connect to dedw1d user edwd using twins
SQL10007N Message "-5005" could not be retrieved. Reason code: "2".
if [ $? -ne 0 ]; then
echo "Unable to Connect to database $DB"
exit 1
fi
+ [ 8 -ne 0 ]
+ echo Unable to Connect to database dedw1d
Unable to Connect to database dedw1d
+ exit 1
Job stopped - before-job routine returned error: Error 1 returned from BEFORE routine DSU.ExecSH
I am trying to use ExecSH in before job subroutine where i am calling a shell script which performs deletion of a million rows in a table x . When i was trying to execute the shell from datastage using ExecSH i am getting following error....... but shellscript works fine when i run from cmd line...
what might be the reasons for the error
jobtest1..BeforeJob (ExecSH): Error when executing command: "/Project/Source/xxx.ksh"
*** Output from command was: ***
DB="db2"
+ DB=db2
USERID="cooo"
+ USERID=cooo
PASSWD="xxx"
+ PASSWD=xxx
db2 "connect to $DB user $USERID using $PASSWD"
+ db2 connect to dedw1d user edwd using twins
SQL10007N Message "-5005" could not be retrieved. Reason code: "2".
if [ $? -ne 0 ]; then
echo "Unable to Connect to database $DB"
exit 1
fi
+ [ 8 -ne 0 ]
+ echo Unable to Connect to database dedw1d
Unable to Connect to database dedw1d
+ exit 1
Job stopped - before-job routine returned error: Error 1 returned from BEFORE routine DSU.ExecSH