Creating a stored procedure to use with MQListener
MQListener uses the stored procedure, aProc, to store a message in a table. The stored procedure returns the string OK if the message is successfully inserted into the table.
Before you begin
The stored procedure requires a C compiler.
About this task
The run database contains the stored procedure that is
run when a message arrives. The run user is the user in whose name
MQListener connects to the run database to run the stored procedure.
Use the following parameters with the db2mqlsn add command to define
the run database and the run user:
- -dbName
- -dbUser
Procedure
Results
fail
cannot be inserted
into the table. The check constraint is used to demonstrate the behavior
of MQListener when the stored procedure fails.