Entry parameters for table-level and row-level user exits in C/C++

The following list describes each parameter in the entry parameter list that must be defined in each C/C++table/row-level user exit program.

Return Code (pReturnCode)
The return code that indicates whether or not the user exit program was successful.
In the user exit program, return an error message ID if errors occurred in the user exit program or blank character if no errors occurred in the user exit program.
User Exit Program Name (pProgramName)
The name of the user exit program that was called.
This is the name of the program that you specify in Management Console.
User Exit Point (entryPointCode)
The table/row-level user exit point where the user exit program was called.
These are the possible returns:
  • 1—Before Clear
  • 2—After Clear
  • 3—Before Insert
  • 4—After Insert
  • 5— Before Update
  • 6—After Update
  • 7—Before Delete
  • 8—After Delete
  • 9—Before Refresh
  • 10—After Refresh
Publisher Before Image (pBeforeRecordData)
The row before image in the source table.
Publisher After Image (pAfterRecordData)
The row after image in the source table.
Publisher Before Image NULL Indicator Count (nullIndBeforeCount)
The number of NULL-capable fields in the before image.
Each NULL-capable field will have a NULL indicator.
Publisher After Image NULL Indicator Count (nullIndAfterCount)
The number of NULL-capable fields in the after image.
Each NULL-capable field will have a NULL indicator.
Publisher Before Image NULL Indicators (pBeforeRecordNullInd)
NULL indicators for all NULL-capable fields in the before image.
These are the possible returns:
  • 0—NULL-capable field is not set to NULL.
  • 1—NULL-capable field is set to NULL.
Publisher After Image NULL Indicators (pAfterRecordNullInd)
NULL indicators for all NULL-capable fields in the after image.
These are the possible returns:
  • 0—NULL-capable field is not set to NULL.
  • 1—NULL-capable field is set to NULL.
Publisher Before Image Journal Data (pBeforeJournalHeader)
Journal control information associated with the before image.
Publisher After Image Journal Data (pAfterJournalHeader)
Journal control information associated with the after image.
Subscriber Final Image Length (internalDataLength)
The length of the fully formatted (final) image that will be applied to the target table.
Subscriber Final Image (pTSInternalBuffer)
The fully formatted (final) image that will be applied to the target table.
Note: The fully formatted image contains the results of data transformations that may have been applied to the replicated after image in the target environment. For target tables that have been mapped under summarization, row consolidation (one-to-one and one-to-many), and adaptive apply, this image, in before user exit program invocations, will contain only default values (blanks, zeroes, and so on) instead of the final image.
Subscriber Final Image NULL Indicator Count (internalNullIndCount)
The number of NULL-capable fields in the fully formatted (final) image. Each NULL-capable field will have a NULL indicator.
Subscriber Final Image NULL Indicators (pTSInternalNullInd)
NULL indicators for all NULL-capable fields in the fully formatted (final) image.
These are the possible returns:
  • 0—NULL-capable field is not set to NULL.
  • 1—NULL-capable field is set to NULL.
Source identifier (pSourceSystemId)
The source identifier identifying the subscription containing the source table.
Source identifiers and subscriptions are defined in Management Console.

Both the pBeforeJournalHeader and pAfterJournalHeader parameters contain the journal control fields listed in Entry parameters for table-level and row-level user exits in RPG.