SQL/MX 3.2.1 Guide to Stored Procedures in Java (H06.26+, J06.15+)

problem with using SIGNAL statement in this case is that the encompassing transaction is aborted,
and therefore the dues will not be updated properly. DBA wants to update the dues but at the same
time, flag the member as being blocked. One solution is to use a CALL statement and delegate the
implementation of the external notification to a member-defined routine.
Consider a stored procedure called INFORM_DBA_FUNC, that writes a message to a file or sends
an e-mail to the DBA with the list of members who have been blocked (member names are sent as
an argument to the routine).
CREATE TRIGGER INFORM_DBA AFTER UPDATE OF (ISBLOCKED)
ON MEMBER
REFERENCING NEW AS NEWR
FOR EACH ROW
WHEN (NEWR.BLOCK <> 0)
CALL INFORM_DBA_FUNC (NEWR.MEMBERNAME);
For information about the CREATE TRIGGER syntax, see the HP Nonstop SQL/MX Release 3.2
Reference Manual.
82 Invoking SPJs in NonStop SQL/MX