STORECLOCK - connect_cdc_sqdata - Latest

Connect CDC (SQData) Apply engine

Product type
Software
Portfolio
Integrate
Product family
Connect
Product
Connect > Connect CDC (SQData)
Version
Latest
Language
English
Product name
Connect CDC (SQData)
Title
Connect CDC (SQData) Apply engine
Copyright
2024
First publish date
2000
ft:lastEdition
2024-07-30
ft:lastPublication
2024-07-30T20:19:56.898694

The STORECLOCK function returns the current eight (8) byte storeclock (STCK) value in a displayable hexadecimal character format of 16 bytes.

Category

Date / Time

Syntax
STORECLOCK()

Parameter and Description

This function has no parameters.

Example

Retrieve the current MVS storeclock value and map the hexadecimal character result in target field USER_STCK.

USER_STCK = STORECLOCK()

Given a current date and time of 12/1/2022 09:15:00

USER_STCK = DC7D0F08AED00000

Note:
  • The MVS Storeclock is used by zOS systems and the tools that run on it like IMS and Db2 to uniquely identify the instant data was changed. More commonly referred to by the assembler instruction STCK that returns its value, it is an 8 byte binary number where bit 51 equal 1 microsecond. The origin (i.e., the meaning of 0) is midnight January 1, 1900. Since it is 8 bytes, it will roll over back to 0 in 2043. zOS ensures that every reference to a STCK will be unique.
  • The Connect CDC (SQData) creates STCK like values for its captures on Linux and AIX as well to provide a common set of multi-platform functions including those that convert the STCK to a human readable Date, Time and Timestamp.

Conversion programs

Performing that conversion outside an Apply Engine is a challenge. There are a few hard to find third party tools to help including one from IBM that converts in both directions. Two examples include the Longpela Expertise page at http://www.longpelaexpertise.com.au/toolsTOD.php

The second is a JavaScript tool from IBM available here https://www.ibm.com/support/pages/store-clock-utility. The utility does require downloading a zip file. Once extracted, simply point your browser to the zos-storeclock-calculator.htm file.

Lastly, a REstructured eXtended eXecutor (REXX) called Time-of-day (TOD) is available on all z/OS systems and part of the IPCS dump analysis component. The conversion program changes a STCK storeclock value to a date and time.

From any ISPF command line, type:

TSO EXEC 'SYS1.SBLSCLI0(TOD)' 'DE5ECFDD84CA2202'
If you have SYS1.SBLSCLI0 in your SYSPROC or SYSEXEC concatenation, you can execute it more simply as:
TSO %TOD  DE5ECFDD84CA2202