|
In this scenario, a user on system 1 wants to add a name to the
database, causing the following events to occur:
- Member 1 checks the user states in the table to determine which
member is PRIMARY.
- Member 1 determines that it is the PRIMARY member.
- Member 1 creates a work element, places it on its own work queue,
and issues to send the work element to the PRIMARY member (in this
case, itself).
IXCMSGOX MEMTOKEN=MEM1TKN,MSGBUF=RECORD1,MSGLEN=LENMSG X
MSGCNTL=REQUPD,TARGET=MEM1TKN,RETCODE=RETURN, X
RSNCODE=REASON,MF=(E,MSGOLSTD)
- The message user routine for member 1 gets control. The routine
checks the message control information and determines that this is
a request to update the database.
- Member 1's message user routine creates a work element to prepare
to receive the message.
- Member 1's message user routine issues IXCMSGIX to read in the
message.
IXCMSGIX MSGTOKEN=TOKENMSG,MSGBUF=(R3),RETCODE=RETURN, X
RSNCODE=REASON,MF=(E,MSGILSTD)
- Member 1's message user routine places the work element on the
DBMGR's work queue, and posts the DBMGR.
- When the DBMGR is done with the work, it issues IXCMSGOX to the
requesting member (member 1 in this case) stating that the work is
completed, deletes the request from DBMGR's work queue, and updates
member 1's status field.
IXCMSGOX MEMTOKEN=MEM1TKN,MSGBUF=RECORD1,MSGLEN=LENMSG X
MSGCNTL=GOODRC,TARGET=MEM1TKN,RETCODE=RETURN, X
RSNCODE=REASON,MF=(E,MSGOLSTD)
- When member 1's message user routine again gets control, the routine
determines that the message control information contains GOODRC, indicating
a successful update.
- Member 1 returns the results of the operation to the caller.
- Member 1 deletes that request from its own work queue.
|