Example

Suppose that the volume of messages handled by your system has increased significantly, and the default message queues can no longer cope. To deal with the additional load you have decided that you need to add a new BGMBOX3 message queue to the BGMBSET Mboxset. This queue requires a new DB2 database queue table sw_db_bgqueue_3. You store your database queue tables in the default iProcess database.

To do this:

1. Connect to the DB2 Server that holds the iProcess database.
2. Create a new table in the iProcess database called sw_db_bgqueue_3.

For example:

CREATE TABLE swpro.sw_db_bgqueue_3 (

rowid numeric(15) NOT NULL
GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),
last_failed numeric(10) ,
failure_count integer NOT NULL,
msg_id varchar(16) FOR BIT DATA NOT NULL,
msg_hdr varchar(500) ,
msg_data varchar(1000) NOT NULL)/

GRANT REFERENCES, SELECT, INSERT, DELETE, UPDATE ON swpro.sw_db_bgqueue_3 TO USER swpro, USER swuser/

3. Use the SWDIR\util\swadm utility to add a new message queue called BGMBOX3, which uses the sw_db_bgqueue_3 queue table.
cd SWDIR\util
swadm ADD_QUEUE BGMBOX3 Local 0003:swpro.sw_db_bgqueue_3
4. Add the BGMBOX3 queue to the BGMBSET Mbox set.
swadm ADD_QUEUE_TO_MBOXSET 1 8

1 is the number of the BGMBSET Mboxset (from the swadm SHOW_MBOXSETS command), and 8 is the number of the message queue (from the swadm SHOW_QUEUES command).