Informix Gurus,
I am having a problem with SYSTEM Command call from stored Proc:
One of our tables have triggers that executes a stored Procedure
in my stored procedure, I make call to SYSTEM command
system "/usr/home/mybin/prog_name "|| arg1 || arg2;
the executable is a 4GL program. which writes an SQL statement
to a file.
in my 4gl code I do a select on 2 tables with a simple join
into a record and format that record to create an SQL stmt.
The above works fine if I execute the procedure from
dbaccess.
But it gives me an SQL error -668 if run my application
and add something to that table which has the trigger
ane execute SP through the trigger.
I put some display staments to debug, It fails when it
came to do a select on the 2 tables. code is similar to the
following
START report stored_proc_rpt TO filename
IF my_flag = "D" THEN
let sqlstmt = " DELETE FROM table1 "
let where_cls = " WHERE cust_port = "
OUTPUT TO REPORT
stored_proc_rpt(sqlstmt,where_cls,my_flag,key,p_intl,p_rec.*)
FINISH REPORT stored_proc_rpt
ELSE
***It does not go Beyond this point "
SELECT table1.EQUIP_ID, tabl1.EQUIP_NAME,
table2.EMS_DOMID
INTO p_rec.*
FROM table1, table2
WHERE table1.ICORE_DOMID = table2.ICORE_DOMID
I am not sure what's causing this to happen, if anybody has
any suggestions please let me know.
Thanks in Advance
Praveen Kalvala