Retrieving data with a stored procedure user exit

You can retrieve data from your source table by passing system parameters to your stored procedure.

You can retrieve the following type of data:

Retrieve system values (s$)
When passed to a stored procedure, the s$ prefix makes system values available from the source database to your stored procedure. For example, s$entry identifies the entry point at which CDC Replication had run the user exit.
Retrieve journal control fields (j$)
When passed to a stored procedure, the j$ prefix makes journal control fields available from the source database to your stored procedure. For example, j$USER identifies the operating system user name of the person that made the update on the source table. This is useful if you are using the stored procedure to audit table or row-level operations that have occurred on the source table.
Retrieve data values
Depending on the prefix you pass to the stored procedure, you can retrieve data from the source database and make it available to your stored procedure. For example, you can use b$ to retrieve the before image of the source column, or you can use k$ to access the target table to find the rows that need to be modified.

Each of these values can be used as input parameters for the stored procedure user exit that you write. The format used to retrieve data is slightly different depending on the product that you are using:

  • For CDC Replication, the format is <x>$<value>

where <x> represents the prefix and <value> represents the name of the value to be retrieved.