Page 1 of 1

Execute Command

Posted: Wed Dec 27, 2006 5:13 am
by kumar_j
Hi Team,

.I want to delete some data before running some set of jobs .
I am trying to use the Execute Command in job sequencer to delete those data.I am using DB2 Database and i wrote the script which connects the database and some delete statements.When i try to run this job, i am getting the following error
.Is there any other way of solving this problem

xyz.sh: CONNECT: not found.
xyz.sh: DELETE: not found.
xyz.sh: COMMIT: not found.



Thanks

Posted: Wed Dec 27, 2006 5:40 am
by johnthomas
xyz.sh: CONNECT: not found.
xyz.sh: DELETE: not found.
xyz.sh: COMMIT: not found.

In the shell script are you executing these ,SQL commands within the command center environment ??

Posted: Wed Dec 27, 2006 7:01 am
by DSguru2B
you need to first set the db2 environment. It is not able to recognize your commands. Try executing cd $DSHOME and then . ./dsenv , that should take care of it.

Posted: Wed Dec 27, 2006 3:27 pm
by ray.wurlod
Show us the script. The DB2 commands only work within the context of the db2 environment, so you probably need to have set up a here script within your script to invoke that environment and provide a "feed" mechanism for commands to it.