You can direct the job log for a job to one or two database files
You can direct the job log with the Control Job Log (QMHCTLJL) API or the Display Job Log (DSPJOBLOG) command. The first database file is the primary job log file. This file contains the essential information for a message, such as, message ID, message type, and message severity. One record is produced in the primary job log file for each message selected for processing. The second file is the secondary job log file. The production of this file is only possible by using QMHCTLJL API; however, it is also optional.
The secondary job log file contains the first and second level text for a message. The text is in print format. Any message data is merged with the message description and the result is formatted into one or more print lines. For each message selected for processing there can be more than one record in the secondary job log file; one record for each first and second level print line.
Records in the primary file can be related to records in the secondary file through use of the Message Reference Key. Each record placed in the primary file contains a field that is the Message Reference Key (MRK) of the related message. Similarly, each secondary file record contains the MRK of the related message. The MRK for a message is unique within the context of a job. Once the MRK of a primary file record is known, the related secondary records can be readily identified since only these secondary records will contain the same MRK value.