gtpc2ma8 | C/C++ Language Support User's Guide |
This function sends a confirmation request to the remote transaction
program and waits for the confirmation reply. This allows the 2
programs to synchronize their processing.
Format
#include <tppc.h>
void tppc_confirm(unsigned int *resid,
struct tppc_return_codes *rcode,
enum t_rtsrcvd *rtsrcvd);
- 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.
- rtsrcvd
- This is a pointer to a 1-byte field that contains the enumeration type
t_rtsrcvd, where the REQUEST_TO_SEND_RECEIVED indication is
placed. The REQUEST_TO_SEND_RECEIVED indication is one of the
following:
- RTSRCVD_YES
- This value indicates that a REQUEST_TO_SEND indication was received from
the remote transaction program. The remote program called
tppc_request_to_send requesting the local TPF transaction program
to enter receive state and placing the remote transaction program
in send state.
- RTSRCVD_NO
- This value indicates that a REQUEST_TO_SEND notification was not
received.
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_confirm 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_SKCNFRM_BADSTATE
| ....
| 00000032
|
LU62RC_SKCNFRM_INVALID
| ....
| 00000033
|
LU62RC_ALLOC_ERROR
| 0003
|
|
LU62RC_SECURITY_NOT_VALID
| ....
| 080F6051
|
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
- 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 verb uses TPF's EVENT and POST facility to suspend the ECB until
the program receives a confirmation reply. Since the ECB is suspended,
you should release all unnecessary resources before issuing this verb.
Failure to do so can cause serious system performance degradation.
- Note:
- You can avoid the problem of suspended ECBs by using the
tppc_activate_on_confirmation function instead of
tppc_confirm. See tppc_activate_on_confirmation-Activate a Program after Confirmation Received for more information.
- If the program does not receive a confirmation reply in a certain amount
of time, TPF/APPC support issues a tppc_deallocate with
DEALLOCATE_TYPE_ABENDP to terminate the conversation. The
amount of time that the system waits is determined by the value you specify
for the TPRECV parameter on the SNAKEY macro. See TPF ACF/SNA Network Generation for information about the
SNAKEY macro.
- When the rtsrcvd parameter is RTSRCVD_YES, 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 tppc_receive or
tppc_prepare_to_receive. The remote partner program enters
the corresponding send state when it calls tppc_receive
and receives the SEND indicator on the whatrcv parameter.
- If rcode is LU62RC_PGMERR_PURGING or LU62RC_SVCERR_PURGING, the
conversation enters receive state.
- See Programming Considerations for Basic Conversation Functions for additional programming considerations relating to the
TPF/APPC basic conversation functions.
Examples
This function sends a confirmation request to the remote transaction
program and waits for the confirmation reply.
#include <tppc.h>
unsigned int resource_id;
struct tppc_return_codes return_code;
enum t_rtsrcvd request_received;
·
·
·
/* set up resource_id with the value returned from the allocate verb */
·
·
·
tppc_confirm(&resource_id,&return_code,&request_received);
/* normal processing path */
·
·
·
Related Information