The CDCUOW function returns the unit-of-work identifier (recovery token) from the changed data capture (CDC) record in a CDC type datastore. This function is useful for maintaining transactional integrity by grouping updates within a particular unit-of-work.
Note: This function replaces the IMSCDCUOW and DB2CDCUOW functions, although these functions are still supported in Connect CDC (SQData) V4.
Category
Change Data Capture
Syntax
CDCUOW(<source_datastore>)
Parameter and Description
Parameter | Description |
---|---|
source_datastore | The name of the source datastore that contains the changed data capture (CDC) records. |
Example
Retrieve the unit-of-work identifier from the current record in the source changed data capture (CDC) datastore CDCIN. Map the result to target field SRC_UOWID.
SRC_UOWID = CDCUOW (CDCIN)
Example 2
Retrieve the IMS Source System Instance from the current record in the source changed data capture (CDC) datastore CDCIN. Map the result to the variable V_SOURCE_SYSTEM_INSTANCE.
V_SOURCE_SYSTEM_INSTANCE = CONVERT_CCSID(X2C(LEFT(CDCUOW(CDCIN),8)),1208,1047)