SW_SET_MBOX

The SW_SET_MBOX procedure tells the current SSOLite session to use a different Mbox set from the default one.

Syntax

SW_SET_MBOX (
mbox_set_id integer)

where:

mbox_set_id is a unique identifier for the Mbox set you want to use.

Notes

This procedure is useful to partition messages for the purpose of performance or service levels. The procedure can be used in many ways, including separating out bulk operations, such as purging or starting cases. Other sessions will still use the default Mbox set for operations such as delayed releases.

Use the SW_UNSET_MBOX procedure to restores using the default Mbox set for all operations.

Example

The following example shows how to set another Mbox set BGMBSETB for bulk operations. You must create the sw_db_bgqueue_3 and sw_db_bgqueue_4 physical queues and bgmboxtable4 tables, and the bgmboxqueue3 and bgmboxqueue4 AQ first. For more information about queue processing and Mbox set creation, see Processing Queues.

# Step 1. Add two new message queues.
#
swadm add_queue BGMBOX3 Local 0003:swpro.sw_db_bgqueue_3
swadm add_queue BGMBOX4 Local 0003:swpro.sw_db_bgqueue_4

# Step 2. Add a new Mbox set.
#
swadm add_mboxset BGMGSETB Local

# Step 3. View Mbox and queue IDs.
#
swadm show_mboxsets v
swadm show_queues

# Step 4. Add the BGMBOX3 and BGMBOX4 message queues to the BGMGSETB Mbox set (
6 is the Mboxset ID of the BGMGSETB Mbox set,
8 is the queue ID of the BGMBOX3 message queue, and
9 is the queue ID of the BGMBOX4 message queue.)
#
swadm add_queue_to_mboxset 6 8
swadm add_queue_to_mboxset 6 9

# Step 5. Set the BGMGSETB Mbox set for bulk case starts.
#
EXEC swpro.SW_SET_MBOX 6

# Step 6. Start the bulk cases.
#
EXEC swpro.SW_ADD_PACK_DATA 'CustName', 'Allsop, J.A'
EXEC swpro.SW_ADD_PACK_DATA 'CustID', '478163'
EXEC swpro.SW_CASESTART 'CUSTREQ', -1, -1, 'Refund request', 'user35', '', 0, 0


# Step 7. Restore using the default Mbox set.
#
EXEC swpro.SW_UNSET_MBOX