Re: Running scripts within SQL
Posted in 2007
Right then....
We are now using stored procedure but are now experiencing other
problems.....namely we are getting errid 668
What we are running is as follows
An Informix trigger (tccom010.test) has been defined on BaaN table
tccom010. This trigger then calls a stored procedure (sp_dev). The
stored procedure then calls a unix script (/root/trigger_tccom010.sql)
containing a call to a BaaN object.
**Trigger**
CREATE TRIGGER tccom010.test
INSERT ON 'baan'.ttccom010700
REFERENCING NEW AS tccom010
FOR EACH ROW
(execute procedure sp_dev(tccom010.t_cuno));
commit;
**Stored Procedure called from trigger**
create procedure sp_dev (customerno varchar(10))
system (/root/trigger_tccom010.sql otccom9100m000 customerno);
end procedure;
commit;
**Script called from stored procedure**
(Located at /root/trigger_tccom010.sql)
/baan4c2/bse/bin/ba6.1 $1 $2
We are running this as user "root"
Sample form $BSE/log/log.informix
2007-11-06[09:39:50]:E:root: ******* S T A R T of Error message
*******
2007-11-06[09:39:50]:E:root: Log message called from /view/port.6.1c.
07.04/vobs/tt/servers/INFORMIX_1/inf_error.c: #379 keyword:
EXECUTE_STMT
2007-11-06[09:39:50]:E:root: Pid 3346 Uid 0 Euid 0 Gid 3 Egid 3
2007-11-06[09:39:50]:E:root: user_type S language 2 user_name root tty
ote locale ISO88591/NULL
2007-11-06[09:39:50]:E:root: Errno 0 bdb_errno 0
2007-11-06[09:39:50]:E:root: Log_mesg: Code -668 ISAM err -1 #rows 0
Lrow 0 Offset 423
2007-11-06[09:39:50]:E:root: ******* E N D of Error message *******