error -668 System command cannot be executed.
Posted in 2006
Topics: Stored Procedures & SPL, Server Administration, Triggers, Constraints & Referential Integrity
Dear All,
My users are getting the error -668 System command cannot be executed.
when they try to insert data into a table through Tibco Adaptors.
I have a trigger which in turn fires a procedure whenever a data is inserted
into a table. Below is the contents of my stored procedure -
CREATE PROCEDURE "rrunner".exceptionproc1(
v_serviceRequestNr LIKE csodetail_excp_tbl.serviceRequestNr,
v_activityNr LIKE csodetail_excp_tbl.activityNr
)
DEFINE v_value CHAR(255);
DEFINE str CHAR(255);
set debug file to "/home/rrunner/exception.txt";
trace on;
LET str = "/home/rrunner/PI/bin/mail_exceptions.ksh";
IF (LENGTH(v_serviceRequestNr) > 0) THEN
LET str = trim(str) || " " || trim(v_serviceRequestNr);
END IF;
IF (LENGTH(v_activityNr) > 0) THEN
LET str = trim(str) || " " || trim(v_activityNr);
END IF;
SYSTEM str;
trace off;
END PROCEDURE;
It fails at the system command, which trieds to generate a mail. However when
i try to insert data using winsql / dbaccess i can insert it successfully. It
only fails using Tibco Adaptors. I have checked all the permissions. Am i
missing something else. please advise.
Thanks in advance.
Regards,
Lloyd
Is it possible that only you have permissions to run or even see the
mail_exceptions.ksh script or one of the directories in it's path is blocked to
other users?
Art S. Kagel
----- Original Message -----
From: Lloyd S <ids@iiug.org>
At: 7/11 5:04:23
Dear All,
My users are getting the error -668 System command cannot be executed.
when they try to insert data into a table through Tibco Adaptors.
I have a trigger which in turn fires a procedure whenever a data is inserted
into a table. Below is the contents of my stored procedure -
CREATE PROCEDURE "rrunner".exceptionproc1(
v_serviceRequestNr LIKE csodetail_excp_tbl.serviceRequestNr,
v_activityNr LIKE csodetail_excp_tbl.activityNr
)
DEFINE v_value CHAR(255);
DEFINE str CHAR(255);
set debug file to "/home/rrunner/exception.txt";
trace on;
LET str = "/home/rrunner/PI/bin/mail_exceptions.ksh";
IF (LENGTH(v_serviceRequestNr) > 0) THEN
LET str = trim(str) || " " || trim(v_serviceRequestNr);
END IF;
IF (LENGTH(v_activityNr) > 0) THEN
LET str = trim(str) || " " || trim(v_activityNr);
END IF;
SYSTEM str;
trace off;
END PROCEDURE;
It fails at the system command, which trieds to generate a mail. However when
i try to insert data using winsql / dbaccess i can insert it successfully. It
only fails using Tibco Adaptors. I have checked all the permissions. Am i
missing something else. please advise.
Thanks in advance.
Regards,
Lloyd
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
On 7/11/06, ART KAGEL, .... <kagel@bloomberg.net> wrote:
> Is it possible that only you have permissions to run or even see the
> mail_exceptions.ksh script or one of the directories in it's path is blocked
> to other users?
See my posting to c.d.i from April 2006 about this.
Google is your friend - but gives horrendously long URLs.
TinyURL.com is your other friend - http://tinyurl.com/fpbeo (24
characters instead of 200).
> ----- Original Message -----
> From: Lloyd S <ids@iiug.org>
>
> My users are getting the error -668 System command cannot be executed.
> when they try to insert data into a table through Tibco Adaptors.
> I have a trigger which in turn fires a procedure whenever a data is inserted
> into a table. Below is the contents of my stored procedure -
>
> CREATE PROCEDURE "rrunner".exceptionproc1(
>
> v_serviceRequestNr LIKE csodetail_excp_tbl.serviceRequestNr,
>
> v_activityNr LIKE csodetail_excp_tbl.activityNr
>
> )
> DEFINE v_value CHAR(255);
> DEFINE str CHAR(255);
> set debug file to "/home/rrunner/exception.txt";
> trace on;
> LET str = "/home/rrunner/PI/bin/mail_exceptions.ksh";
> IF (LENGTH(v_serviceRequestNr) > 0) THEN
>
> LET str = trim(str) || " " || trim(v_serviceRequestNr);
> END IF;
> IF (LENGTH(v_activityNr) > 0) THEN
>
> LET str = trim(str) || " " || trim(v_activityNr);
> END IF;
> SYSTEM str;
>
> trace off;
> END PROCEDURE;
>
> It fails at the system command, which trieds to generate a mail. However when
> i try to insert data using winsql / dbaccess i can insert it successfully. It
> only fails using Tibco Adaptors. I have checked all the permissions. Am i
> missing something else. please advise.
Record and report the ISAM error. Most likely, the program run by
your SYSTEM statement is not exiting with a 0 (success) status. You
will have to determine whether that matters or not.
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/