gtpc2maeC/C++ Language Support User's Guide

tppc_post_on_receipt-Set Posting Active for a Conversation

This function causes the conversation to be posted when information is available for the transaction program to receive. The information may be data or conversation information. The tppc_wait function should be called after this function in order to wait for posting to occur. Alternatively, tppc_test can be called after this function in order to determine when posting has occurred.

Format

#include   <tppc.h>
void       tppc_post_on_receipt(unsigned int *resid,
                                struct tppc_return_codes *rcode,
                                enum t_post_on_receipt_fill fill,
                                unsigned short int *length);

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.

fill
This argument must belong to the enumeration type t_post_on_receipt_fill, defined in tppc.h. Use the value POST_ON_RECEIPT_FILL_LL, which specifies that posting occurs when a complete or truncated logical record is received, or when a part of a logical record is received that is at least equal in length to that specified on the length parameter.
Note:
The TPF system does not support the BUFFER option defined by the LU 6.2 architecture.

length
This is a pointer to a 2-byte field that specifies the minimum amount of data the LU must receive before the conversation can be posted. Use length along with the fill argument to determine when to post the conversation for the receipt of data. If the value is a NULL pointer, the conversation is posted when a complete logical record is received or other, nondata, information is received (such as CONFIRM or PREPARE_TO_RECEIVE).

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_post_on_receipt 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_PK_BAD_OPTION .... 00C62074
  LU62RC_INVALID_LENGTH .... 00000006
LU62RC_STATE_CHECK 0002  
  LU62RC_SKPOSTR_BADSTATE .... 00000092
LU62RC_TPF_ABEND FFFF  

Programming Considerations

Examples

The following example causes the conversation to be posted when information is available for the transaction program to receive.

#include <tppc.h>
 
      unsigned int               resource_id;
      struct   tppc_return_codes return_code;
      unsigned short int          length;

  ·
  ·
  ·
/* set up resource_id with the value returned from the allocate verb */
  ·
  ·
  ·
tppc_post_on_receipt(&resource_id,&return_code,POST_ON_RECEIPT_FILL_LL, \ &length); /* normal processing path */
  ·
  ·
  ·

Related Information