Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can A System Trigger Call A Sql Stored Proc?

PROC sql stored system Trigger
0
Posted

Can A System Trigger Call A Sql Stored Proc?

0

I’ve created a system or external trigger on an AS/400 file a.k.a DB2 table. (Note this is an external trigger defined with the ADDPFTRG CL command, not a SQL trigger defined with the CREATE TRIGGER statement.) I’ve also defined a SQL stored proc, and the trigger is set to call this SP. I’ve posted the simplified source below. I can manually call the stored proc, and the external trigger is created without any errors. However, when I do an insert into the table in question, the trigger returns an error (posted below). I believe my problem is either 1) I’m not accepting the trigger buffer contents correctly in the stored proc, or 2) you simply can’t have an external trigger call a SQL stored proc. (I don’t believe #2 is the problem, based on the docs, but I could be wrong.) I believe #1 is the problem, but I can’t find any example in the docs or any redbooks that show how to have a system trigger call a SQL stored proc. What I’m actually after is the RRN that is passed in inside the tri

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123