gtpg2m4qGeneral Macros

TPPCC RECEIVE

Use the TPPCC general macro with the RECEIVE verb specified to wait for information to arrive on the specified conversation and then receive the information. If information is already available, the information is received without waiting. The information received can be data, conversation status, or a confirmation request.

The transaction program can issue this verb when the conversation is in send state. In this case, the SEND indication is sent to the remote transaction program, and the local TPF side of the conversation is changed to receive state and waits for information to arrive. The remote program can send data to the local program after it receives the SEND indication.

Format




label
A symbolic name can be assigned to the macro statement.

RECEIVE
Directs the TPPCC macro to perform the RECEIVE verb function.

RESID
Specifies the symbolic name of a field or a register pointing to a field This is a 4-byte field in which the resource ID is supplied. This resource ID must be the one assigned on the initial ALLOCATE for this conversation or one that was assigned by an incoming ATTACH.

FILL
LL specifies that the program is to receive one complete or truncated logical record, or a portion of a logical record that is equal to the length specified by the LENGTH parameter. See the programming considerations for an explanation of the record format.

TPF does not support the BUFFER option defined by the LU 6.2 architecture.

WAIT
YES is the only supported option, which performs the function of RECEIVE_AND_WAIT. TPF does not support the RECEIVE_IMMEDIATE verb function defined by the LU 6.2 architecture.

LENGTH2
Specifies the symbolic name of a field or a register pointing to a field. This is a 2-byte field in which the maximum length of data to receive is supplied. The value can be from 0 to 32767. When control is returned to the TP, this variable contains the actual amount of data the program received up to the maximum. If the TP receives information other than data, this variable remains unchanged.

DATA2
Specifies the symbolic name of a field or a register pointing to a field in which the program is to receive the data.

RCODE
Specifies the symbolic name of a field or a register pointing to a field This is a 6-byte field in which the return code is placed. The return code consists of a 2-byte primary return code followed by a 4-byte secondary return code. The actual values returned are listed in Return Conditions.

WHATRCV
Specifies the symbolic name of a 1-byte field or a register that contains the WHAT_RECEIVED indication. The WHAT_RECEIVED indication is one of the following values:

LU62WR_DATACOMPLETE
Indicates that a complete logical record or the last remaining portion of a logical record is received.

LU62WR_DATAINCOMPLETE
Indicates that less than a complete logical record was received by the local TPF transaction program. This can be caused by the remote transaction program issuing a verb that causes data truncation, such as DEALLOCATE with one of the abend parameters.

LU62WR_LL_TRUNCATED
Indicates that the 2-byte length field of a logical record was truncated after the first byte. The TPF/APPC support code discards the truncated length field; it is not received by the program.

LU62WR_CONFIRM
Indicates that the remote program issued CONFIRM, requesting the local TPF transaction program to respond by issuing CONFIRMED. The local TPF transaction program can instead issue SEND_ERROR.

LU62WR_CONFIRMSEND
Indicates the remote program issued PREPARE_TO_RECEIVE with TYPE=CONFIRM. The local TPF transaction program can respond by issuing CONFIRMED or SEND_ERROR.

LU62WR_SEND
Indicates the remote program has entered receive state, placing the local program in send state. The local TPF transaction program can now issue SEND_DATA.

LU62WR_CONFIRMDLLOC
Indicates the remote program issued DEALLOCATE with TYPE=CONFIRM. The local TPF transaction program can respond by issuing CONFIRMED or SEND_ERROR.

RTSRCVD
Specifies the symbolic name of a 1-byte field or a register that contains a value that indicates whether a REQUEST_TO_SEND has been received. The REQUEST_TO_SEND_RECEIVED indication is:

LU62_RTSND_RCVDYES
Indicates a REQUEST_TO_SEND indication has been received from the remote transaction program. The remote program issued REQUEST_TO_SEND, requesting the local TPF transaction program to enter receive state and placing the remote transaction program in send state.

Any other value indicates that a REQUEST_TO_SEND notification has not been received.

Entry Requirements

Return Conditions

Programming Considerations

Examples

SYMB100   TPPCC RECEIVE,                           X
                RESID=EBW004,                      X
                FILL=LL,                           X
                DATA=(R3),                         X
                LENGTH=(R2),                       X
                WAIT=YES,                          X
                RCODE=EBW064,                      X
                WHATRCV=EBW016,                    X
                RTSRCVD=EBSW01

Footnotes:

2
The LENGTH parameter is a supplied and returned parameter. If used, both DATA and LENGTH must be specified.

3
The last remaining portion of a complete logical record can be returned if this RECEIVE followed a RECEIVE that used the DATA and LENGTH parameters and had a WHAT_RECEIVED indicator of LU62WR_DATAINCOMPLETE.

4
Truncated logical records can be received if the remote transaction program caused data truncation by issuing SEND_ERROR or DEALLOCATE TYPE=any ABEND.

5
The AM0CCT field is equal to the actual text count in this block plus 5, which is the length of the AM0SG filler. Thus the physical length of data in a block is (AM0CCT - 5).