Format of the history log

A database file is used to store the messages sent to a log message queue on the system. Because all records in a physical file have the same length and messages sent to a log have different lengths, the messages can span more than one record.

Each record for a message has three fields:

  • System date and time (a character field of length 8). This is an internal field. The converted date and time also are in the message.
  • Record number (a 2-byte field). For example, the field contains hex 0001 for the first record, hex 0002 for the second record, and so on.
  • Data (a character field of length 132).

The third field (data) of the first record has the following format.

Contents Type Length Positions in record
Job name Character 26 11-36
Converted date and time1 Character 13 37-49
Message ID Character 7 50-56
Message file name Character 10 57-66
Library name Character 10 67-76
Message type2 Character 2 77-78
Severity code Character 2 79-80
Sending program name3 Character 12 81-92
Sending program instruction number4 Character 4 93-96
Receiving program name3 Character 10 97-106
Receiving program instruction number4 Character 4 107-110
Message text length Binary 2 111-112
Message data length Binary 2 113-114
Coded character set identifier (CCSID) for text or data5 Binary 4 115-118
Sending user profile Character 10 119–128
Reserved Character 14 129-142
Notes:
1
The format is: cyymmddhhmmss

where:

c
Is the century digit (c=0 if yy ≥ 40, c = 1 if yy < 40)
yymmdd
Is the year, month, and day that the message is sent
hhmmss
Is the hour, minute, and second that the message is sent
2
This has the same value as the RTNTYPE parameter on the Receive Message (RCVMSG) command.
3
If the sender or receiver is an ILE procedure, the entry in the history log contains only the ILE program name. The module name and procedure name are not included in the history log.
4
If the sender or receiver is an ILE procedure, the sending or receiving instruction number is 0.
5
This CCSID applies only to the message data that is defined as *CCHAR data if the message is a stored message. The rest of the message data can be considered 65 535. Otherwise, this is the CCSID of the immediate message.

The third field (data) of the remaining records has the following format.

Contents Type Length
Message (includes immediate message text) Character Variable1
Message data Character Variable2
Notes:
1
This length is specified in the first record (positions 111 and 112) and cannot exceed 132.
2
This length is specified in the first record (positions 113 and 114).

A message is never split when a new version of a log is started. The first and last records of a message are always in the same QHST log version file.