BEA Logo BEA Tuxedo Release 8.0

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   Tuxedo Documentation   |   Programming BEA Tuxedo ATMI Applications Using COBOL   |   Local Topics   |   Previous Topic   |   Next Topic   |   Contents

 


Getting Unsolicited Messages

To get unsolicited messages, you must call the TPGETUNSOL(3cbl) routine. This routine can be called, however, only from an unsolicited message handler. Use the following signature to call the TPGETUNSOL routine:

01 TPTYPE-REC.
COPY TPTYPE.
01 DATA-REC.
COPY User data.
01 TPSTATUS-REC.
COPY TPSTATUS.
CALL "TPGETUNSOL" USING TPTYPE-REC DATA-REC TPSTATUS-REC.

Refer to Defining a Service for a description of the TPTYPE-REC record.

The following example shows how to get an unsolicited message.

Getting an Unsolicited Message

 IDENTIFICATION DIVISION.
PROGRAM-ID. TMDISPATCH9.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. USL-486.
OBJECT-COMPUTER. USL-486.
*
DATA DIVISION.
WORKING-STORAGE SECTION.
*
01 TPTYPE-REC.
COPY TPTYPE.
*
01 TPSTATUS-REC.
COPY TPSTATUS.
*
01 DATA-REC PIC X(1000).
*
PROCEDURE DIVISION.
*
A-000.
*
MOVE "CARRAY" TO REC-TYPE.
MOVE 1000 TO LEN.
CALL "TPGETUNSOL" USING TPTYPE-REC
DATA-REC
TPSTATUS-REC.
IF NOT TPOK
error processing
*
Process message
DISPLAY "TPGETUNSOL IS TPOK".
DISPLAY "MESSAGE IS" DATA-REC.
DISPLAY "LENGTH IS" LEN.
EXIT PROGRAM.
*

 

back to top previous page next page