[Top] [Prev] [Next] [Bottom]

TPGETUNSOL(3CBL)

TPGETUNSOL(3CBL)

Name

TPGETUNSOL-get unsolicited message

synopsis

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.

Description

TPGETUNSOL gets unsolicited messages that were sent via TPBROADCAST() or TPNOTIFY(). This routine may only be called from an unsolicited message handler.

Upon successful return, LEN IN TPTYPE_REC contains the actual number of bytes moved into DATA-REC. REC-TYPE and SUB-TYPE, both in TPTYPE-REC, contain the data's type and sub-type, respectively. If the message is larger than DATA-REC, then DATA-REC will contain only as many bytes as will fit in the record. The remainder of the message is discarded and sets TPTRUNCATE. If LEN is 0, upon successful completion, then the message has no data portion and DATA-REC was not modified.

It is an error for LEN to be 0 on input.

Return Values

Upon successful completion, TPGETUNSOL sets TP-STATUS to [TPOK]. If the size of the incoming message was larger then the size specified in LEN on input, TPTRUNCATE is set and only LEN amount of data was moved to DATA-REC, the remaining data is discarded.

Errors

Under the following conditions, TPGETUNSOL fails and sets TP-STATUS to:

[TPEINVAL]
Invalid arguments were given.

[TPEPROTO]
TPGETUNSOL was called in an improper context.

[TPESYSTEM]
A BEA TUXEDO system error has occurred. The exact nature of the error is written to a log file.

[TPEOS]
An operating system error has occurred.

See Also

TPSETUNSOL()



[Top] [Prev] [Next] [Bottom]