BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   Tuxedo Doc Home   |   Programming   |   Topic List   |   Previous   |   Next   |   Contents

   Programming a BEA Tuxedo Application Using COBOL

Checking for Unsolicited Messages

To check for unsolicited messages while running the client in "dip-in" notification mode, use the TPCHKUNSOL(3cbl) routine with the following signature.

01 MSG-NUM          PIC S9(9)  COMP-5.
01 TPSTATUS-REC.
COPY TPSTATUS.
CALL "TPCHKUNSOL" USING MSG-NUM TPSTATUS-REC.

If any messages are pending, the system invokes the unsolicited message handling routine that was specified using TPSETUNSOL. Upon completion, the routine returns either the number of unsolicited messages that were processed and sets TP-STATUS to [TPOK].

If you issue this routine when the client is running in SIGNAL-based, thread-based notification mode, or is ignoring unsolicited messages, the routine has no impact and returns immediately.

The following example shows how to check for the arrival of an unsolicited message.

Arrival of an Unsolicited Message


*
* Check for unsolicited messages
*
CALL "TPCHKUNSOL" USING MESS-NUM
TPSTATUS-REC.
*
IF TPOK
IF MESS-NUM IS = 0
No messages were processed by the
unsolicited routine
ELSE
MESS-NUM number of messages were
processed by the unsolicited routine
END-IF
ELSE
process error
END-IF