The CDCTSTMPPK function returns the eight (8) byte storeclock (STCK) value from a changed data capture (CDC) record in a 20 byte packed (without punctuation) timestamp human readable format. The value identifies the time (based on a 24 hour clock) that the update took place within a transaction or program. While the storeclock value is actually 8 bytes in length, the timestamp returns a value with microsecond precision, in effect loosing the last 12 bits of the 64 bit storeclock. The timestamp is in YYYYMMDDHHMMSSSSSS format.
Category
Change Data Capture
Syntax
CDCTSTMP(<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 packed timestamp value of the zOS storeclock from the current record in the source changed data capture (CDC) datastore CDCIN. Map the result to target field SRC_TSTAMP.
SRC_TSTAMP = CDCTSTMPPK (CDCIN)
Assuming that the zOS system is set to use a UTC clock (vs a local timezone), the function would return the translated value of the current Storeclock (see CDCSTCK):
20210820151233086193 - UTC
If the zOS system was set to EDT (Eastern Daylight Time) the Storeclock value would have translated to:
20210820111233086193 - EDT
Note:
- See STORECLOCK for more information including how to convert from and to the STCK value outside the product.
- See the CDCSTCK and CDCTSTMP functions for more details. Connect CDC SQData cannot determine if UTC or a timezone was used when MVS was configured..
- This function replaces the IMSCDCTSTMPPK and DB2CDCTSTMPPK functions, although these functions are still supported in Connect CDC SQData V4.