Journaling

Top  Previous  Next

XCICS Transaction Server provides a journaling system similar to the one featured by IBM CICS(tm).

XCICS Journals are kept into stream files, which organization reflects the one described in the "IBM CICS Customization Guide", but with some differences due to the different operating system.

Journal files

Each journal is contained in a single stream file, containing a record for each journaling call.

The record is composed by two different parts:

Record Header
Caller Data

Record Header

The record header contains information that describes some of the attributes of the record, and it has always the same structure.

This is the format of the record header:

GLRH_RECORD_LENGTH          4-byte record length.
GLRH_HEADER_LENGTH          4-byte header length.
GLRH_REC_DATA_LEN           4-byte record data length.
GLRH_GMT                    8-byte time (GMT).
GLRH_LOCAL                  8-byte time (local).
GLRH_TRAN_ID                4-byte transaction identifier.
GLRH_TASK_ID                4-byte task identifier.
GLRH_TERM_ID                4-byte terminal identifier.
GLRH_REC_TYPE               2-byte record type. Either:
                                X'0001'  Start of run record
                                X'0002'  Any other record
GLRH_REC_COMPID             2-byte domain identifier.
GLRH_REC_JOURNAL            8-byte journal name.
Start of task               indicator 1-byte which may contain:
                                X'8n'   Equivalent to JCSPSOTK (start of task)
                                X'4n'   Equivalent to JCSPLSTK (start of UOW)

Caller Data

The caller data contains the information being tracked, and it differs depending on the XCICS component issuing the record, and on the function being journaled. Two record types are present:

Start-of-run records
General Caller Data

Format of Start-of-run records

When XCICS opens a journaling log, it writes a start-of-run record to it as the first record for this run of XCICS. This record comprises a record header (with the same format as that for any general log journal record) followed by a start-of-run body. 

This is the format of Start-of-run record:

SOR_CICS_RELEASE            4-byte CICS release.
SOR_SPECIFIC_APPLID         8-byte CICS applid.
SOR_CICS_USERNAME           8-byte CICS username.

Format of caller data

Caller data follows the record header.

The format of the caller data part of a general log journal record differs according to the XCICS component writing the record, and the function being journaled.

Journal records can be written by any of the following XCICS components:

journal control (in the case of a request issued by a user)
file control (actually not yet supported)
terminal control

The field GLRH_REC_COMPID in the record header tells you which component has written the record: UJ, FC, or TC respectively.

This is the structure of a  caller data record:

CL_UH_LENGTH                4-byte header length.
CL_UH_JOURNAL_TYPE          2-byte journal type.
Reserved                    2-byte reserved field.
CL_UH_PREFIX_LENGTH         4-byte prefix length.
Prefix                      Variable-length prefix area.
User data                   Variable-length user data.