Making sure log blocks are imported in sequence - Understanding log block identifiers

When you import data to a log stream (using IXGIMPRT), the requests are issued with a log block identifier and UTC time stamp identical to the matching log block in the source log stream. The application must make sure to import these log blocks in ascending log block/UTC time stamp order.

For example, if the importing application has log blocks with identifiers 1, 2, and 4 ready to import, the application might need to wait and check for log block 3 before importing 1, 2, and 4 into a log stream. Once log block 4 has been imported, log block 3 can never be imported into the log stream (unless you delete and redefine the log stream). In order to determine whether it is importing log blocks in the correct order, the application must understand the way system logger generates log block identifiers.

The block identifier consists of the logical relative byte address of the log block in relation to the start of the log stream. The first log block written to a log stream is assigned a block identifier of one. Whenever a system logger application writes a log block successfully to the log stream, system logger adds additional control information to the log block. To generate the sysplex-wide unique block identifier, system logger uses:
The formula is as follows:
Length of current log block
            +
length of control information
            +
last log block identifier.