TPPCC SEND_DATA
Use the TPPCC general macro with the SEND_DATA verb specified to send data to the remote transaction program. The data sent consists of logical records.
Last updated
Changed for PUT00.
Format
- label
- is a symbolic name that can be assigned to the macro statement.
- SEND_DATA
- directs the TPPCC macro to perform the SEND_DATA 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.
- DATA
- specifies the symbolic name of a field or a register pointing to a field from which the data is to be sent. The location in memory must be below the 2G bar in the ECB virtual memory.
- LENGTH
- specifies the symbolic name of a field or a register pointing
to a field. This is a 2-byte field that contains the length of the
data to be sent. The value can be from 0 to 32767. This data length
is not related in any way to the length of a logical record. It is
used only to determine the length of the data located at the address
specified by the DATA parameter. Note: If the DATA and LENGTH parameters are omitted, the data is assumed to be on data level 0 in AM0SG format. See the programming considerations for an explanation of the record format.
- 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.
- RTSRCVD
- specifies the symbolic name of a 1-byte field or a register that
contains a value the indicates whether a REQUEST_TO_SEND has been
received. The REQUEST_TO_SEND_RECEIVED indication can contain:
- 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 z/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.
- AMODE
- specifies the format that is used by all address parameters. The
valid address format values are:
- amodedef
- is the default value specified by the AMODE parameter of the BEGIN macro. If AMODE is not specified on the BEGIN macro, the default value is 31.
- 31
- indicates addresses are specified in 31-bit format.
- 64
- indicates addresses are specified in 64-bit format.
Entry requirements
- The conversation must be in send state.
- See Entry requirements for the entry requirements relating to the TPPCC macro in general.
Return conditions
- The results of the verb are indicated by the value returned in RCODE. The valid return codes are listed in the following section, “Return Codes”.
- See Return conditions for the return conditions relating to the TPPCC macro in general.
- The following table contains a list of the primary and secondary
return codes that can be returned to the program that issued the SEND_DATA
verb. A complete list of return codes and their definitions can be
found in Table 2 and
in Table 3.
Symbolic Name Primary Code Secondary Code LU62RC_OK 0000 LU62RC_PARAMETER_CHECK 0001 LU62RC_PK_BAD_TCBID .... 00000001 LU62RC_PK_BAD_CONVID .... 00000002 LU62RC_INVALID_LENGTH .... 00000006 LU62RC_PKSENDD_BADLL .... 000000F1 LU62RC_STATE_CHECK 0002 LU62RC_SKSENDD_BADSTATE .... 000000F2 LU62RC_ALLOC_ERROR 0003 LU62RC_TP_NOT_AVAIL_RETRY .... 084B6031 LU62RC_TP_NOT_AVAIL_NO_RETRY .... 084C0000 LU62RC_TPN_NOT_RECOGNIZED .... 10086021 LU62RC_PIP_NOT_SPECIFIED_CORRECTLY .... 10086032 LU62RC_CONV_TYPE_MISMATCH .... 10086034 LU62RC_SYNLVL_NOTSUPORT .... 10086041 LU62RC_DLLOC_ABEND_PGM 0006 LU62RC_DLLOC_ABEND_SVC 0007 LU62RC_DLLOC_ABEND_TMR 0008 LU62RC_PGMERR_PURGING 000E LU62RC_CONVFAIL_RETRY 000F LU62RC_CONVFAIL_NORETRY 0010 LU62RC_SVCERR_PURGING 0013 LU62RC_TPF_ABEND FFFF
Programming considerations
- For information about macro register conventions, see Register conventions.
- If you specify a register for a keyword value, the register must be enclosed in parentheses and in the range R1–R7.
- The value supplied in RESID must be the resource ID returned by the ALLOCATE verb or one that was assigned by an incoming ATTACH.
- The following considerations apply if you do not specify the DATA
and LENGTH parameters:
- The data to be sent must be in the main storage block attached to data level 0 (D0) in AMSG format. The block can be a small (381), large (1055), or 4KB storage block. The data must be in logical record format, that is, the first 2 bytes contain the length of the logical record followed by the data. The storage block can contain one or more full logical records, or it can contain a partial logical record. The number of bytes within the block to be sent is always in the AMSG length field (AM0CCT) regardless of the logical record boundary. It is the transaction program's responsibility to insure the accuracy of both the logical record length field (LL preceding the text) and the storage block length field (AM0CCT).1
- If the complete logical record does not fit into one block, the message can be forward chained. The number of bytes of text for each of the chained segments is placed in the AMSG length field (AM0CCT), and the file address of the next segment is placed in the standard z/TPF forward chain field (AM0FWD). A forward chain field containing zeros indicates the last segment of a chained logical record. The logical record length in the first 2 bytes of the first or only segment contains the length of the entire logical record, while the AM0CCT field of each segment contains the physical number of bytes of text in each segment.
- The transaction program can also send logical records by issuing multiple SEND_DATA verbs for segments of the logical record. In this case, the first segment must contain the logical record length (LL) preceding the first byte of the text, and the AMSG length field (AM0CCT) must contain the number of bytes within each storage block.
- If the return code is not LU62RC_OK, the data remains on D0 unchanged.
- The following considerations apply if you specify the DATA and
LENGTH parameters:
- The data must be in logical record format, that is, the first 2 bytes contain the length of the logical record followed by the data.
- The number of bytes to be sent is always the value pointed to by the LENGTH parameter regardless of the logical record boundary.
- It is the transaction program's responsibility to insure the accuracy of both the logical record length field (LL preceding the text) and the LENGTH parameter.
- The entire storage area referred to by the DATA and LENGTH parameters must be addressable by the TPF/APPC support code.
- The maximum size of a logical record is 32,767.
- When the value of the RTSRCVD parameter is LU62_RTSND_RCVDYES, the remote program is requesting the local z/TPF transaction program to enter receive state and thereby place the remote program in send state. The local z/TPF transaction program enters receive state by issuing a RECEIVE verb or a PREPARE_TO_RECEIVE verb. The remote partner program enters the corresponding send state when it issues a RECEIVE verb and receives the SEND indicator on the WHATRCV parameter.
- See Programming considerations for the programming considerations relating to the TPPCC macro in general.
Examples
SYMB100 TPPCC SEND_DATA, X
RESID=(R6), X
DATA=(R3), X
LENGTH=(R2), X
RCODE=EBW064, X
RTSRCVD=EBSW01 Related information
None.
1 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).
