Previous Topic: &SNAMS DEREGISTER

Next Topic: &SNAMS RECEIVE_NOTIFY

&SNAMS RECEIVE

The &SNAMS RECEIVE verb receives an MDS-MU that is a reply or error message.

An NCL application uses this option to receive an MDS request (if explicitly registered), an MDS reply (if a requester) following a previous SEND operation, or an MDS error message.

This verb has the following format:

&SNAMS RECEIVE MU=mdo 
             [ ID=requestID ] 
             [ WAIT=nnn ]

Operands:

MU=mdo

Specifies the target MDO for the MDS-MU received. The value is a stem name or a compound MDO name.

ID=requestid

(Optional) Specifies the message identifier.

When omitted, SNAMS returns the first MDS-MU received on behalf of this NCL process.

If supplied, it is the request identifier for an outstanding &SNAMS SEND request, or the registration identifier of an application registration. Both of these identifiers are returned in the &ZSNAMID system variable after their respective &SNAMS requests.

WAIT=nnn

Specifies the time, in seconds (for example, 15) or seconds and hundredths (for example, 1.25), for which the procedure is prepared to wait for the arrival of an MDS-MU. If one is not available before this interval expires, the receive request is canceled and an unsuccessful return code results (that is, &RETCODE is set to 12).

Return Codes:

&RETCODE

&ZFDBK

Meaning

0

0

MDS-MU received successfully

4

0

Request cannot be satisfied - no outstanding request

8

0

Data is invalid for the specified MDO (mapped)

12

0

Request timed out - no data

For &RETCODE 0, the &ZSNAMID variable contains the message identifier for the MDS-MU received. This value is the request identifier for an outstanding &SNAMS SEND request; otherwise, the registration identifier of the receiving application.

For &RETCODE 8, the &SYSMSG variable contains an error message.

Notes:

This verb affects outstanding &SNAMS RECEIVE_NOTIFY requests as follows: