|
I'm trying to call a stored procedure from an SQL trigger. <<SNIP>>
Here is the SQL code for creating a stored procedure over the RPG
CREATE PROCEDURE SNDSYNCPRC (
IN TICKTYPE CHAR(10),
IN PDFNAME CHAR(50),
IN BEFORESIGNED CHAR(1),
IN AFTERSIGNED CHAR(1))
LANGUAGE RPGLE
DETERMINISTIC
NO SQL
EXTERNAL NAME SNDSYNCMGQ
PARAMETER STYLE GENERAL
<<SNIP>>
Here is the SQL code that I am using to create the SQL Trigger
CREATE TRIGGER TESTTRIGGER
AFTER INSERT ON WEBTICK
REFERENCING NEW ROW AS NEWTICKROW
FOR EACH ROW
MODE DB2ROW
WHEN (NEWTICKROW.WTSIGNREQ = 'Y')
CALL SNDSYNCPRC (NEWTICKROW.WTTKTTYPE, NEWTICKROW.WTPDFNAME,
'N', NEWTICKROW.WTSIGNREQ)
This fails with the following error:
Message ID . . . . . . : SQL0312 Severity . . . . . . . : 30
Message type . . . . . : Diagnostic
Message . . . . : Variable WTSIGNREQ not defined or not usable.
<<SNIP>>
this create trigger code is following an example that I found in the
STORED PROCEDURES, TRIGGERS AND UDF Functions Redbook.
Can anyone out there point out what I am doing wrong on this?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.