Licensed Materials - Property of IBM
5655-Y04
(C) Copyright IBM Corp. 1994, 1998 All Rights Reserved.
A General Log is any CICS log other that the CICS System Log. It
may reside upon the MVS Logger or upon MVS SMF. Such a log
comprises a sequence of contiguous blocks. A block is the unit of
output when flushing the internal log buffer.
Each block comprises a block header followed by a variable number
of CICS records. The format of the block header is defined by the
dsect "lgbh_block_header".
Each CICS record comprises a record header followed by the caller
data part. The record header is defined by the dsect
"glrh_record_header".
The format of the caller data part is unknown at the Log Manager
functional level. It usually comprises one or several other CICS
component record headers followed by yet another embedded caller
data part. The record header fields "glrh_rec_type" and
"glrh_rec_compid" indicates which CICS component is to be used to
define this part of the record.
If this is 'UJ', which means the record originated form an
application program, then this record header is followed by a user
header as defined by "cl_user_header".
The following diagram shows the physical layout of a General Log
block.
general log
__ first general log block
__ __ block header (lgbh_block_header)
__ __ __ first cics record
__ __ __ __ record header (glrh_record_header)
__ __ __ __ caller data
__ __ __ next cics record
__ __ __ ...
__ __ __ last cics record
__ __ __ ...
__ next general log block
__ ...
__ last general log block
__ ...
This copybook defines the block header, record header, general
user header, and 'start of run' record body for General Logs.
--------------------------------------------------------------------
Each block starts with a block header as defined here.
--------------------------------------------------------------------
Table 1.
Offset Hex |
Type |
Len |
Name (Dim) |
Description |
(0) |
STRUCTURE |
40 |
LGBH_BLOCK_HEADER |
(0) |
STRUCTURE IsA( MVSLOGBLOCKHEADER) |
40 |
* |
(0) |
CHARACTER |
8 |
LGBH_GLOBAL_INFO |
(0) |
CHARACTER |
4 |
LGBH_BLOCK_TYPE |
set to '>DFH' to |
(0) |
CHARACTER |
1 |
LGBH_BT_ARROW |
identify a CICS |
(1) |
CHARACTER |
3 |
LGBH_BT_DFH |
block |
(4) |
CHARACTER |
4 |
* |
(4) |
UNSIGNED |
1 |
LGBH_LOG_TYPE |
general or system log |
(5) |
CHARACTER |
1 |
LGBH_FLAGS |
reserved |
(6) |
UNSIGNED |
2 |
LGBH_BLOCK_VER |
block format version number |
(8) |
CHARACTER |
24 |
LGBH_CICS_INFO |
(8) |
CHARACTER |
8 |
LGBH_GENERIC_APPLID |
CICS generic applid |
(10) |
CHARACTER |
8 |
LGBH_START_GMT |
record time (GMT) |
(18) |
CHARACTER |
8 |
LGBH_START_LOCAL |
record time (LOCAL) |
(20) |
CHARACTER |
8 |
LGBH_BLOCK_INFO |
(20) |
CHARACTER |
8 |
LGBH_BLOCK_NUMBER |
block sequence number |
(28) |
CHARACTER |
0 |
LGBH_DATA |
records follow |
--
Each record starts with a record header as defined here.
--------------------------------------------------------------------
Table 2.
Offset Hex |
Type |
Len |
Name (Dim) |
Description |
(0) |
STRUCTURE |
56 |
GLRH_RECORD_HEADER |
(0) |
STRUCTURE IsA( GENLOGRECORD) |
56 |
* |
(0) |
CHARACTER |
12 |
* |
(0) |
UNSIGNED |
4 |
GLRH_RECORD_LENGTH |
inclusive length of this record |
(4) |
UNSIGNED |
4 |
GLRH_HEADER_LENGTH |
inclusive length of this header |
(8) |
UNSIGNED |
4 |
GLRH_REC_DATA_LEN |
length of data following this header |
(C) |
CHARACTER |
16 |
GLRH_TIMESTAMPS |
timestamps |
(C) |
CHARACTER |
8 |
GLRH_GMT |
record time (GMT) |
(14) |
CHARACTER |
8 |
GLRH_LOCAL |
record time (LOCAL) |
(1C) |
CHARACTER |
12 |
GLRH_TASK_INFO |
logging task information |
(1C) |
CHARACTER |
4 |
GLRH_TRAN_ID |
transaction id |
(20) |
CHARACTER |
4 |
GLRH_TASK_ID |
task number |
(24) |
CHARACTER |
4 |
GLRH_TERM_ID |
terminal id |
(28) |
CHARACTER |
12 |
GLRH_RECORD_ID |
record identification |
(28) |
UNSIGNED |
2 |
GLRH_REC_TYPE |
start_of_run (sor) or user |
(2A) |
CHARACTER |
2 |
GLRH_REC_COMPID |
logging component id |
(2C) |
CHARACTER |
8 |
GLRH_REC_JOURNAL |
logging journal name |
(34) |
CHARACTER |
4 |
GLRH_LGSSI |
for DFHLGSSI conversion rtn |
(34) |
CHARACTER |
1 |
GLRH_LGSSI_FLAGS |
not set for system log |
(34) |
1... .... |
|
GLRH_START_OF_TASK |
equivalent to JCSPSOTK |
(34) |
.1.. .... |
|
GLRH_START_OF_UOW |
equivalent to JCSPLSTK |
(35) |
CHARACTER |
3 |
GLRH_LGSSI_RSVD |
reserved |
(38) |
CHARACTER |
0 |
GLRH_REC_DATA |
--
When CICS connects to a MVS Logger General Log it writes a
'start-of-run' record to the log as the first record written
during this run of CICS. This record is made up of a record header
as defined above followed by the dsect "gl_sor_body".
NOTE: "gl_sor_body" is a particular case of 'caller data' referred
to above.
The following diagram shows how a 'start-of-run' record appears
within a General Log block.
general log
__ ...
__ a general log block
__ __ block header (lgbh_block_header)
__ __ __ first cics record
__ __ __ __ record header (glrh_record_header)
__ __ __ __ start of run record body (gl_sor_body)
__ __ __ next cics record
__ __ __ ...
__ __ __ last cics record
__ __ __ ...
--------------------------------------------------------------------
Table 3.
Offset Hex |
Type |
Len |
Name (Dim) |
Description |
(0) |
STRUCTURE |
20 |
GL_SOR_BODY |
(0) |
STRUCTURE IsA( STARTOFRUNDATA) |
20 |
* |
(0) |
CHARACTER |
20 |
SOR_CICS_INFO |
start-of-run information |
(0) |
CHARACTER |
4 |
SOR_CICS_RELEASE |
CICS version and release |
(4) |
CHARACTER |
8 |
SOR_SPECIFIC_APPLID |
CICS specific applid |
(C) |
CHARACTER |
8 |
SOR_CICS_USERNAME |
CICS userid |
--
The CICS API supports writing directly to a user journal (which
may be a General Log or the System Log) using the EXEC CICS WRITE
JOURNALNAME command. This takes as input the journal type, user
data and optional user prefix data. These elements are put
together as shown in the dsect "cl_user_header".
NOTE: "cl_user_header" is a particular case of 'caller data'
referred to above.
In this case "glrh_rec_compid" will be set to 'UJ'.
The following diagram shows how a user header appears within a
General Log record.
general log
__ ...
__ general log block
__ __ block header (lgbh_block_header)
__ __ __ first cics record
__ __ __ ...
__ __ __ next cics record
__ __ __ __ record header (glrh_record_header)
__ __ __ __ user header (cl_user_header)
__ __ __ __ rest of caller data
__ __ __ last cics record
__ __ __ ...
NOTE: "cl_uh_prefix_length" shows the number of bytes of data that
is contained in the user prefix. The user prefix data, if present,
immediately follows this header, which in turn is followed by the
user data.
--------------------------------------------------------------------
Table 4.
Offset Hex |
Type |
Len |
Name (Dim) |
Description |
(0) |
STRUCTURE |
12 |
CL_USER_HEADER |
(0) |
STRUCTURE IsA( GENLOGUSER) |
12 |
* |
(0) |
UNSIGNED |
4 |
CL_UH_LENGTH |
length of structure inclusive of this field |
(4) |
UNSIGNED |
2 |
CL_UH_JOURNAL_TYPE |
journal type |
(6) |
CHARACTER |
2 |
CL_UH_RSVD1 |
reserved |
(8) |
UNSIGNED |
4 |
CL_UH_PREFIX_LENGTH |
user prefix length |
(C) |
CHARACTER |
0 |
CL_UH_END |
user prefix data (if any) followed by user data |
Table 5.
Len |
Type |
Value |
Name |
Description |
|
2 |
DECIMAL |
1 |
LGBH_BLOCK_VERSION_NO |
3 |
CHARACTER |
DFH |
LGBH_BLOCK_TYPE_DFH |
1 |
CHARACTER |
> |
LGBH_BLOCK_TYPE_ARROW |
1 |
DECIMAL |
0 |
LGBH_LOG_TYPE_GENERAL |
1 |
DECIMAL |
1 |
LGBH_LOG_TYPE_SYSTEM |
2 |
DECIMAL |
1 |
SOR_REC_TYPE |
2 |
DECIMAL |
2 |
USER_REC_TYPE |