Product Documentation

V11.5 Update Guide

Previous Topic

Next Topic

Record update callback

An application that uses the record update callback function feature needs to know what operations are associated with a particular transaction and what are the first and last operations for that transaction. In V11.5 and later FairCom Server provides this information to the record update callback function:

  • The first operation in a transaction has the ctDFR_TRANFRS bit set in the status1 field of the pdfrky parameter that is passed to the record update callback function.

    The last operation in a transaction has the ctDFR_TRANLST bit set in the status1 field of the pdfrky parameter that is passed to the record update callback function. So, if a transaction has only one DFRKEY entry, that entry will have both the ctDFR_TRANFRS bit and the ctDFR_TRANLST bit set. If a transaction has more than one DFRKEY entry, the first entry will have the ctDFR_TRANFRS bit set and the last entry will have the ctDFR_TRANLST bit set.

  • An optional parameter of type pRUCBSTT is passed to the record update callback function. This structure has the following definition:

    typedef struct rucbstt_t {

    LONG verson; /* structure version */

    LONG avail; /* padding- available for use */

    LONG8 tranno; /* transaction number for the operation */

    } RUCBSTT, *pRUCBSTT;

Note: For FairCom Server to pass this third parameter to your record update callback function, your record update callback DLL or shared library must export the function rucbCheckVersionCallback(), which has the following function prototype:

NINT rucbCheckVersionCallback(pRUCBACB prucbacb,pNINT pversion);

prucbacb is the record update callback definition in the format of the record update callback add operation structure, RUCBACB. The function can choose to examine the record update callback definition to decide which version of the RUCB API it supports. For example, it can choose based on the callback name (prucbacb->cbname) or the name of the record update callback function (prucbacb->fncnames[2]).

The function should set pversion to the version of the record update callback API your DLL uses and return zero to indicate success. Supported versions are:

  • a) Version 1 of record update callback API. Your record update callback function must conform to the following prototype:
    NINT rucbRecordUpdateCallback (pRUCBF prucbf,pRUCBO prucbo);
  • b) Version 2 of record update callback API. Your record update callback function must conform to the following prototype:
    NINT rucbRecordUpdateCallback (pRUCBF prucbf,pRUCBO prucbo,pRUCBSTT prucbstt);

If your record update callback DLL does not export a function named rucbCheckVersionCallback(), FairCom Server uses version 1 of the record callback API.

In This Section

ctRecordUpdateCallbackControl - Option to update all existing records

TOCIndex