

CREATE PROCEDURE stomp_send(IN VARCHAR(255) BY DESCRIPTOR,
                            IN INTEGER BY VALUE,
                            IN VARCHAR(255) BY DESCRIPTOR,
                            IN VARCHAR(255) BY DESCRIPTOR);
EXTERNAL NAME stomp_send LOCATION 'disk2:[arne.dbmq]cproc.exe'
LANGUAGE GENERAL PARAMETER STYLE GENERAL
BIND ON SERVER SITE;
COMMIT;

GRANT EXECUTE ON PROCEDURE stomp_send TO PUBLIC;
COMMIT;

CREATE TRIGGER t1insert
AFTER INSERT ON t1
(CALL stomp_send('arnepc4', 61613, '/queue/t1insert', CAST(t1.f1 AS VARCHAR(10)))) FOR EACH ROW;
COMMIT;
