gtpc2makC/C++ Language Support User's Guide

tppc_test-Test Conversation

This function tests the conversation for a specified condition. The results of the test are indicated in the return code.

Format

#include   <tppc.h>
void       tppc_test(unsigned int *resid,
                     struct tppc_return_codes *rcode,
                     enum t_test_test test);

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.

test
This specifies the type of test to be performed. This argument must belong to the enumeration type t_test_test, defined in tppc.h. Use one of the following values:

TEST_TEST_POSTED
This value specifies to test whether the conversation was posted.

TEST_TEST_RTSRCVD
This value specifies to test whether the REQUEST_TO_SEND notification was received from the remote transaction program.

Return Codes

The following tables contain a list of the primary and secondary return codes that can be returned to the program that called the tppc_test function. A complete list of the return codes and their definitions can be found in Table 37 and Table 38.

Table 42. Return Codes for TEST=POSTED

Symbolic Name Primary Code Secondary Code
LU62RC_OK 0000  
  LU62RC_POSTED_DATA .... 00000000
  LU62RC_POSTED_NOTDATA .... 00000001
LU62RC_PARAMETER_CHECK 0001  
  LU62RC_PK_BAD_TCBID .... 00000001
  LU62RC_PK_BAD_CONVID .... 00000002
LU62RC_STATE_CHECK 0002  
  LU62RC_NOT_RCV_STATE .... 00000122
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_DLLOC_NORMAL 0009  
LU62RC_POSTING_NOTACTIV 000B  
LU62RC_PGMERR_NOTRUNC 000C  
LU62RC_PGMERR_TRUNC 000D  
LU62RC_PGMERR_PURGING 000E  
LU62RC_CONVFAIL_RETRY 000F  
LU62RC_CONVFAIL_NORETRY 0010  
LU62RC_SVCERR_NOTRUNC 0011  
LU62RC_SVCERR_TRUNC 0012  
LU62RC_SVCERR_PURGING 0013  
LU62RC_LLRCV_UNSUCESFUL 0014  
LU62RC_TPF_ABEND FFFF  

Table 43. Return Codes for TEST=RTSRCVD

Symbolic Name Primary Code Secondary Code
LU62RC_OK 0000  
LU62RC_PARAMETER_CHECK 0001  
  LU62RC_PK_BAD_TCBID .... 00000001
  LU62RC_PK_BAD_CONVID .... 00000002
LU62RC_LLRCV_UNSUCESFUL 0014  
LU62RC_TPF_ABEND FFFF  

Table 44. Return code when TEST is neither POSTED nor RTSRCVD

Symbolic name Primary Code Secondary Code
LU62RC_PARAMETER_CHECK 0001  
  LU62RC_PK_BAD_OPTION .... 00C62074

Programming Considerations

Examples

The following example tests if a conversation was posted.

#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_test(&resource_id,&return_code,TEST_TEST_POSTED); /* normal processing path */
  ·
  ·
  ·

Related Information