gtpc2malC/C++ Language Support User's Guide

tppc_wait-Wait for Posting

This function waits for posting to occur on any mapped or basic conversation from a list of conversations. Posting of a conversation occurs when posting is active for the conversation and information that the conversation can receive, such as data, conversation status, or a request for confirmation, is available.

Format

#include   <tppc.h>
void       tppc_wait(unsigned int *residl,
                     struct tppc_return_codes *rcode,
                     unsigned int  *respstd);

residl
This is a pointer to a variable-length field that contains the resource IDs of the conversations for which posting is expected. The resource IDs must be the resource IDs assigned on the initial ALLOCATE for the conversations or assigned by an incoming ATTACH. The variable length field is in the format:

Note:
This list can contain as many as 20 entries, which allows space for 19 resource IDs and the delimiter.

rcode
This is a pointer to the structure tppc_return_codes, defined in tppc.h, where the return code is to be placed.

respstd
This is a pointer to a 4-byte field where the resource ID of a posted conversation is returned.

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_wait 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_POSTED_DATA .... 00000000
  LU62RC_POSTED_NOTDATA .... 00000001
LU62RC_PARAMETER_CHECK 0001  
  LU62RC_PK_BAD_TCBID .... 00000001
  LU62RC_PK_BAD_CONVID .... 00000002
  LU62RC_PK_EMPTY_RESIDL .... 00000003
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_TPF_ABEND FFFF  

Programming Considerations

Examples

The following example waits for posting to occur on any one of a list of conversations.

#include <tppc.h>
 
      unsigned int               resource_id_list[10];
      struct   tppc_return_codes return_code;
      unsigned int               posted_resource_id;

  ·
  ·
  ·
resource_id_list[0] = conversation_1; resource_id_list[1] = conversation_2; resource_id_list[2] = conversation_3; resource_id_list[3] = 0; /* zero resource id indicates the end of the list. */
  ·
  ·
  ·
tppc_wait(resource_id_list,&return_code,&posted_resource_id); /* normal processing path */
  ·
  ·
  ·

Related Information