gtpc2may | C/C++ Language Support User's Guide |
This function allows the application to transmit any data from the local
LU's data buffer, including an ATTACH from the cmallc
function.
Format
#include <tpfmap.h>
void cmflus(unsigned char *conversation_ID,
signed int *return_code);
- conversation_ID
- This is a pointer to an 8-byte character array that contains the
conversation ID. This conversation ID must be the ID returned by the
cminit (INITIALIZE) or cmaccp (ACCEPT_CONVERSATION) that
started this conversation.
- return_code
- This is a pointer to a 4-byte field where the return code is to be
placed.
Return Codes
The following is a list of return codes that can be returned to the program
that called the cmflus function. A complete list of the
return codes and their definitions can be found in Table 45.
- CM_OK
- CM_CONVERSATION_TYPE_MISMATCH
- CM_DEALLOCATED_ABEND
- CM_PRODUCT_SPECIFIC_ERROR
- CM_PROGRAM_ERROR_PURGING
- CM_PROGRAM_PARAMETER_CHECK -- The specified conversation_ID
is invalid.
- CM_PROGRAM_STATE_CHECK -- The program is not in send or
send-pending state.
- CM_RESOURCE_FAILURE_NO_RETRY
- CM_RESOURCE_FAILURE_RETRY
- CM_SVC_ERROR_PURGING
- CM_SYNC_LVL_NOT_SUPPORTED_PGM
- CM_TP_NOT_AVAILABLE_NO_RETRY
- CM_TP_NOT_AVAILABLE_RETRY
- CM_TPN_NOT_RECOGNIZED.
Programming Considerations
- You can execute this function on any I-stream.
- The conversation must be in send or send-pending
state.
- The value supplied in conversation_ID must be the conversation ID
returned by the cmaccp or cminit function.
- If this function is called while the conversation is in
send-pending state and return_code is CM_OK, the
conversation enters send state.
- 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 cmsend 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 cmflus 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. 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.
Examples
The following example calls the cmflus function.
#include <tpfmap.h>
unsigned char convid[8];
signed int rcode;
.
.
/* set conversation_ID with value returned from accept or initialize */
.
.
cmflus(convid,&rcode);
. /* normal processing path */
.
.
Related Information