Execute Command

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
kumar_j
Participant
Posts: 45
Joined: Mon Nov 28, 2005 2:43 am

Execute Command

Post 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
johnthomas
Participant
Posts: 56
Joined: Mon Oct 16, 2006 7:32 am

Post 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 ??
JT
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply