Primary job log model

The IBM® supplied model for the primary job log file is QAMHJLPR in library QSYS. The primary record format is QMHPFT.

A detailed description of this format follows:

Field Order Field Name Data Type Length in Bytes Field Description
1 QMHJDT DATE 10 Date job log created
2 QMHJTM TIME 8 Time job log created
3 QMHMRK CHAR 4 Message reference key
4 QMHTYP CHAR 10 Message type
5 QMHSEV BIN 4 Message severity
6 QMHMID CHAR 7 Message ID
7 QMHDAT DATE 10 Message sent date
8 QMHTIM TIME 8 Message sent time
9 QMHMF CHAR 20 Message file name
10 QMHRPY CHAR 4 Reply reference key
11 QMHRQS CHAR 1 Request Message Status
12 QMHSTY CHAR 1 Sending program type
13 QMHRTY CHAR 1 Receiving program type
14 QMHSSN BIN 4 Number of statements for sending program
15 QMHRSN BIN 4 Number of statements for receiving program
16 QMHCID BIN 4 CCSID of the message data or immediate message
17 QMHPRL CHAR 1 Message percolated indicator
18 QMHSPR VAR CHAR 256 MAX Sending procedure name
19 QMHSMD CHAR 10 Sending module name
20 QMHSPG CHAR 12 Sending program name
21 QMHSLB CHAR 10 Sending library name
22 QMHSTM CHAR 30 Statement number(s) for sending program
23 QMHRPR VAR CHAR 256 MAX Receiving procedure name
24 QMHRMD CHAR 10 Receiving module name
25 QMHRPG CHAR 10 Receiving program name
26 QMHRLB CHAR 10 Receiving program library name
27 QMHRTM CHAR 30 Statement number(s) for receiving program
28 QMHSYS CHAR 8 System name
29 QMHJOB CHAR 26 Qualified Job name
30 QMHMDT VAR CHAR 3000 MAX Message data or immediate message
31 QMHCSP VAR CHAR 4096 MAX Complete sending procedure name
32 QMHCRP VAR CHAR 4096 MAX Complete receiving procedure name
33 QMHLSP VAR CHAR 6144 MAX Long sending program name
34 QMHTID CHAR 8 Thread
35 QMHMSC ZONED 6,0 Microseconds
36 QMHFUS CHAR 10 From user

The definition of the fields in this record are as follows:

QMHJDT
Date job log created; DATE(10)

The date the production of the job log began. The field is a date field in the database record. The format of the date is *ISO. A value in this date field is in the format yyyy-mm-dd. Each record produced for the same job log will have the same value in this field.

QMHJTM
Time job log create; TIME(8)

The time the production of the job log began. This field is defined as a time field in the database record. The format of the time is defined to be *ISO. A value in this time field is in the format hh.mm.ss. Each record produced for the same job log will have the same value in this field.

QMHMRK
Message reference key; CHAR(4)

The message reference key the related message had in the job message queue. The records are placed in the primary database file in strictly ascending sequence by message reference key. Within the set of records produced for a single job log, this field is unique for each record and thus can be used as a unique key for the record. If the records for two or more job logs are placed into the same member, the key may no longer be unique.

QMHTYP
Message type; CHAR(10)
The message type of the related message. One of the following special values will appear in this field:
*CMD
Commands that are logged from the execution of a CL program.
*COMP
Completion message type.
*COPY
Sender's copy message type.
*DIAG
Diagnostic message type.
*ESCAPE
Escape message type.
*INFO
Information message type.
*INQ
Inquiry message type.
*NOTIFY
Notify message type.
*RQS
Request message type.
*RPY
Reply message type.
QMHSEV
Message severity; BIN(4)

The severity the message has. This is a value from 0 through 99.

QMHMID
Message ID; CHAR(7)

The message ID for the message. This field will contain the special value *IMMED if the message is an immediate message which has no message ID.

QMHDAT
Message sent date; DATE(10)

The date the message was sent. This field is defined as a date field in the database record. The format of the date is *ISO. A value in this field is in the format yyyy-mm-dd.

QMHTIM
Message sent time; TIME(8)

The time the message was sent. The field is defined as a time field in the database record. The format of the time is defined to be *ISO. A value in this field is in the format hh.mm.ss.

QMHMF
Message File; CHAR(20)

The name of the message file that is to be used to obtain the message description for the message. The first 10 characters of the field contain the message file name. The second 10 characters contain the library name. If the field QMHMID contains *IMMED to indicate an immediate message, this field will contain all blanks.

QMHRPY
Reply reference key; CHAR(4)
  • If the message type of the message is inquiry, notify, or sender's copy, this is the message reference key of the related reply message.
  • If there is no reply message available this field will contain a null value ('00000000'X).
  • If the message type is not inquiry, notify, or sender's copy, this field will also contain a null value.

In order to maintain the strictly ascending sequence by message reference key, the record for the reply message may not immediately follow the record for the inquiry, notify, or sender's copy message.

QMHRQS
Request Message Status; CHAR(1)
  • If the message type is *RQS, this is an indicator which shows whether the request message was run or not.
  • If the indicator is set to zero ('F0'X) the request was not run.
  • If the indicator is set to one ('F1'X) the request was run.
If the messages type is not *RQS, this indicator will always be zero.
QMHSTY
Sending program type; CHAR(1)

An indicator with the following values that shows whether the sending program was an OPM program or an ILE program.

  • If this indicator is set to zero ('F0'X), the sending program is an OPM or System Licensed Internal Code (SLIC) program with a name less than or equal to 12 characters. The program name is placed in fields QMHSPG and QMHLSP.
  • If the indicator is set to one ('F1'X), the sending program is an ILE program with a procedure name less than or equal to 256 characters. The procedure name is placed in fields QMHSPR and QMHCSP.
  • If the indicator is set to two ('F2'X), the sending program is an ILE program with a procedure name greater than 256 characters and up to 4096 characters. The complete sending procedure name is in field QMHCSP; field QMHSPR is blank.
  • If the indicator is set to three ('F3'X), the sending program is a SLIC program with a name greater than 12 characters and up to 256 characters. The complete sending program name is in field QMHLSP; field QMHSPG is blank.
QMHRTY
Receiving program type; CHAR(1)

An indicator with the following values that shows the type of the receiving program:

  • If this indicator is set to zero ('F0'X), the receiving program was an OPM program. The program name is placed in field QMHRPG.
  • If the indicator is set to one ('F1'X), the receiving program was an ILE program with a procedure name less than or equal to 256 characters. The procedure name is placed in fields QMHRPR and QMHCRP.
  • If the indicator is set to two ('F2'X), the receiving program is an ILE program with a procedure name greater than 256 and up to 4096 characters. The entire receiving procedure name is placed field QMHCRP; the field QMHRPR is blank.
QMHSSN
Number of statements for sending program; BIN(4)

The number of statement numbers for sending program.

  • If the sending program type field QMHSTY contains a zero ('F0'X) or a three ('F3'X), this field contains a value of 0 or 1.
  • If the sending program type field contains a one ('F1'X) or a two ('F2'X), this field can contain the value 0, 1, 2, or 3.

The value provided in this field defines how many statement numbers are in the field QMHSTM.

QMHRSN
Number of statements for receiving program; BIN(4)

The number of statement numbers for receiving program.

  • If the receiving program type field QMHRTY contains a zero ('F0'X), this field contains a value of 0 or 1.
  • If the receiving program type field contains a one ('F1'X) or a two ('F2'X), this field contains the value 0, 1, 2, or 3. The value provided in this field defines how many statement numbers are in the field QMHRTM.
QMHCID
CCSID; BIN(4)

The CCSID of the message data or immediate message that is contained in the field QMHMDT.

QMHPRL
Message percolate indicator; CHAR(1)

An indicator that shows whether the message was percolated to the receiving program or not.

  • If the message was not percolated this field contains a zero ('F0'X).
  • If the message was sent this field contains a one ('F1'X).

Message percolation can only occur within an ILE program. Therefore, this field contains a one only if the receiving program type field QMHRTY contains a one ('F1'X) or a two ('F2'X).

QMHSPR
Sending procedure name; VAR CHAR(*)
  • If the sending program type field QMHSTY contains a zero ('F0'X) or three ('F3'X), this field contains the value *N.
  • If the sending program type field QMHSTY contains a one ('F1'X), this field contains the sending ILE procedure name. The name can be a maximum of 256 characters in length.
  • If the sending program type field QMHSTY contains a two ('F2'X), this filed contains blanks, while the entire name will be contained in the field QMHCSP.

This field can contain a nested procedure name for a sending program type of one ('F1'X) or two ('F2'X); each procedure name is separated by a colon. The outer-most procedure name is identified first and is followed by the procedures contained in it. The inner-most procedures are identified last in the string.

QMHSMD
Sending module name; CHAR(10)
  • If the sending program type field QMHSTY contains a zero ('F0'X) or a three ('F3'X), this field contains the value *N.
  • If the sending program type field QMHSTY contains a one ('F1'X) or a two ('F2'X), this field contains the sending ILE module name.
QMHSPG
Sending program name; CHAR(12)
  • If the sending program type field QMHSTY contains a zero ('F0'X), a one ('F1'X), or a two ('F2'X), the field contains the program name from which the message was sent.
  • If the sending program type is a three ('F3'X), this field contains blanks and field QMHLSP contains the sending program name.
QMHSLB
Sending library name; CHAR(10)

The name of the library that the sending program was contained in.

QMHSTM
Statement number(s) for sending program; CHAR(30)

The statement number(s) at which the sending program sent the message. Each statement number is 10 characters in length.

  • If the sending program type field QMHSTY contains a zero ('F0'X) or a three ('F3'X), there is, at most, one statement number in the first 10 characters. That statement number represents an MI instruction number. The number is a hexadecimal number.
  • If the sending program type field contains a one ('F1'X) or a two ('F2'X), this field can contain statement numbers of 0, 1, 2, or 3. The field QMHSSN specifies how many there are. In this case, a statement number is a higher level language statement number and not an MI instruction number. Each number is a decimal number.
QMHRPR
Receiving procedure name; VAR CHAR(*)
  • If the receiving program type field contains a zero ('F0'X), this field contains the value *N.
  • If the receiving program type field QMHRTY contains a one ('F1'X), this field contains the receiving ILE procedure name. The name can be a maximum of 256 characters in length.
  • If the receiving program type field QMHRTY contains a two ('F2'X), this field contains blanks, while the entire name will be contained in the field QMHCRP.

This field can contain a nested procedure name for a receiving program type of one ('F1'X) or two ('F2'X); each procedure name is separated by a colon. The outer-most procedure name is identified first and is followed by the procedures contained in it. The inner-most procedures are identified last in the string.

QMHRMD
Receiving module name; CHAR(10)
  • If the receiving program type field contains a zero ('F0'X), this field contains the value *N.
  • If the receiving program type field QMHRTY contains a one ('F1'X) or a two ('F2'X), this field contains the receiving ILE module name.
QMHRPG
Receiving program name; CHAR(10)

The program name of the OPM or ILE program to which the message was sent.

QMHRLB
Receiving library name; CHAR(10)

The name of the library that the receiving program was in.

QMHRTM
Statement number(s) for receiving program; CHAR(30)

The statement number(s) at which the receiving program was stopped when the message was sent. Each statement number is 10 characters in length.

  • If the receiving program type field QMHRTY contains a zero ('F0'X), there is, at most, one statement number in the first 10 characters. That statement number represents an MI instruction number. The number is a hexadecimal number.
  • For any other value of the receiving program type, there can be 0, 1, 2, or 3 statement numbers in this field. The field QMHRSN specifies how many there are. In this case, a statement number is a higher level language statement number and not an MI instruction number. Each number is a decimal number.
QMHSYS
System name; CHAR(8)

The name of the system that the job log was produced on.

QMHJOB
Qualified job Name; CHAR(26)

The fully qualified name of the job for which the message is being logged for. The first 10 positions contain the job name, the next 10 positions the user name, and the last six positions the job number.

QMHMDT
Message data or immediate message; VAR CHAR(*)

If the field QMHMID contains the special value *IMMED, this field contains an immediate message. Otherwise, this field contains the message data that was used when the message was sent. This field can contain a maximum of 3000 characters. If the immediate message or message data is longer, it is truncated to 3000 characters.

If the message data contains pointers, the pointers is invalidated before the message data is written to the database file.

QMHCSP
Complete sending procedure name; CHAR(VAR)
  • If the sending program type is zero ('F0'X) or three ('F3'X), this field contains blanks.
  • If the sending program type is one ('F1'X) or two ('F2'X), this field contains the entire ILE procedure name. The name can be a maximum of 4096 characters in length.

    This field can contain a nested procedure name where each procedure name is separated by a colon. The outer-most procedure name is identified first and is followed by the procedures contained in it. The inner-most procedures are identified last in the string.

QMHCRP
Complete receiving procedure name; CHAR(VAR)
  • If the receiving program type is zero ('F0'X), this field contains blanks.
  • If the receiving program type is one ('F1'X) or two ('F2'X), this field contains the entire ILE procedure name. The name can be a maximum of 4096 characters in length.

    The field can contain a nested procedure name where each procedure name is separated by a colon. The outer-most procedure name is identified first and is followed by the procedures contained in it. The inner-most procedures are identified last in the string.

QMHLSP
Long sending program name; CHAR(VAR)

This field contains the entire sending program name from which the message was sent for all sending program types. The name can be a maximum of 6144 characters in length.

QMHTID
Thread; CHAR(8)

This field identifies the thread within the job that sent the message.

QMHMSC
Microseconds; ZONED(6,0)

This is the microseconds portion of the time the message was sent. It can be used to determine with more precision the time the message was sent.

QMHFUS
From user; CHAR(10)

The name of the user profile that the thread was running under when the message was sent.

The IBM supplied model for the secondary job log file is QAMHJLSC in library QSYS. The secondary record format name is QMHSFT. A detailed description of the secondary record format follows:

Field Order Field Name Data Type Length in Bytes Field Description
1 QMHJDS DATE 10 Date job log created
2 QMHJTS TIME 8 Time job log created
3 QMHMKS CHAR 4 Message reference key
7 QMHSYN CHAR 8 System name
8 QMHJBN CHAR 26 Qualified job name
4 QMHLNN BIN 4 Message line number
5 QMHSID BIN 4 CCSID of text line
6 QMHTTY CHAR 1 Message text indicator
9 QMHLIN CHAR 78 Message text line

The length of the field indicates the number of total bytes for the field.

The definition of the fields in this record are as follows:

QMHJDS
Date job log created; DATE(8)

The date the production of the job log began. The field is a date field in the database record. The format of the date is *ISO. A value in this field is in the format yyyy-mm-dd. Each record produced for the same job log will have the same value in this field.

QMHJTS
Time job log created; TIME(8);

The time the production of the job log began. This field is defined as a time field in the database record. The format of the time is defined to be *ISO. A value in this field is in the format hh.mm.ss. Each record produced for the same job log will have the same value in this field.

QMHMKS
Message reference key; CHAR(4)

The message reference key the related message had in the job message queue. The records are placed in the secondary database file in ascending sequence by message reference key. There can be more than one secondary record for a specific message reference key. This field also exists in the related primary record. Therefore, once the message reference key is obtained from a primary record, it can be used to read the related records from the secondary file.

QMHSYN
System name; CHAR(8)

The name of the system that the job log was produced on.

QMHJBN
Qualified job Name; CHAR(26)

The fully qualified name of the job for which the message is being logged for. The first 10 positions contain the job name, the next 10 positions the user name, and the last six positions the job number.

QMHLNN
Message line number; BIN(4)

The line number of the line within the text type. For both the first and second level text, the line number starts at one for the first line of the text and is incremented by one for each additional line within that level.

QMHSID
CCSID of message text line; BIN(4)

The CCSID of the message text line that is contained in field QMHLIN.

QMHTTY
Message text type; CHAR(1)

An indicator which specifies whether field QMHLIN contains a line of the first or second level text. This field will contain one of the following values:

1
Field QMHLIN contains first level text.
2
Field QMHLIN contains second level text.
QMHLIN
Message text line: CHAR(78)

This field contains one line of the first or second level text.