The Display History Log (DSPHSTLOG) command I presented in the preceding installment of APIs by Example introduced an enhanced interface to the system history log messages (June 23, 2011, article ID 66046). The command supports new selection criteria in contrast to the native Display Log (DSPLOG) command, letting you easily filter to see only the messages of specific interest, and many message attributes were added to the DSPHSTLOG command’s list panel’s alternate view, including message ID, message severity, message type, qualified sending job name, and sending date and time.
The DSPHSTLOG command at this point, however, lacks an option to display the listed history log messages’ formatted second-level message text and other information associated with the history log message. So with today’s installment, I add an F9 function key to the history log message list panel. Positioning the cursor on the log message of interest and pressing F9 causes message details and second-level message text to be displayed. From the resulting display panel, you can then press F9 again to see all remaining log message details.
As I discuss in the preceding installment, the DSPHSTLOG command is based on the Open List of History Log Messages (QMHOLHST) API, which returns the selected history log messages in a predefined format named HSTL0100. The HSTL0100 return format contains all the information necessary to retrieve and construct the message text and the second-level message text, respectively.
Download the save file containing the source code.