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.
Format
- label
- A symbolic name 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.
- 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 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
- 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 11 and in Table 12.
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
- 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).6
- 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 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 TPF transaction program to enter
receive state and thereby place the remote program in
send state. The local 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
Footnotes:
- 6
-
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).