gtpc2mab | C/C++ Language Support User's Guide |
This function allows the application to transmit any data from the data
buffer of the local LU, including an ATTACH from the tppc_allocate
function.
Format
#include <tppc.h>
void tppc_flush(unsigned int *resid,
struct tppc_return_codes *rcode);
- resid
- This is a pointer to a 4-byte field that contains the resource ID.
This resource ID must be the ID assigned on the initial ALLOCATE for this
conversation or one that was assigned by an incoming ATTACH.
- rcode
- This is a pointer to the structure tppc_return_codes, defined
in tppc.h, where the return code is to be placed.
Return Codes
The following table contains a list of the primary and secondary return
codes that can be returned to the program that called the
tppc_flush function. A complete list of the return codes and
their definitions can be found in Table 37 and Table 38.
Symbolic Name
| Primary Code
| Secondary Code
|
LU62RC_OK
| 0000
|
|
LU62RC_PARAMETER_CHECK
| 0001
|
|
LU62RC_PK_BAD_TCBID
| ....
| 00000001
|
LU62RC_PK_BAD_CONVID
| ....
| 00000002
|
LU62RC_STATE_CHECK
| 0002
|
|
LU62RC_SKFLUSH_BADSTATE
| ....
| 00000061
|
LU62RC_TPF_ABEND
| FFFF
|
|
Programming Considerations
- The conversation must be in send state.
- The value supplied in resid must be the resource ID returned by
the tppc_allocate function or one that was assigned by an incoming
ATTACH.
- This function is useful for optimization of processing between the local
and remote transaction programs. The TPF/APPC support code buffers the
information from consecutive tppc_send_data functions until it has
a sufficient amount of information for transmission. At that time, it
transmits the buffered data. However, the local TPF transaction program
can issue tppc_flush in order to cause the TPF/APPC support code to
transmit any buffered data. In this way, the local program can minimize
the delay in the remote transaction program's processing. The
TPF/APPC support code actually flushes the buffered data only when it has some
data buffered; if there is no data buffered, nothing is transmitted to
the remote LU. The buffer size is determined by the maximum request
unit (RU) size of the session, which is negotiated at BIND time.
- See Programming Considerations for Basic Conversation Functions for additional programming considerations relating to the
TPF/APPC basic conversation functions.
Examples
The following example invokes the tppc_flush function.
#include <tppc.h>
unsigned int resource_id;
struct tppc_return_codes return_code;
·
·
·
/* set up resource_id with the value returned from the allocate verb */
·
·
·
tppc_flush(&resource_id,&return_code);
/* normal processing path */
·
·
·
Related Information