APIs by Example: New Open List API Offers Enhanced Interface to History Log

Release 6.1 included a new Open List of History Log Messages (QMHOLHST) API, which in itself offers program access to the contents of the system history log but also further enhances the filtering options compared to the selection parameters offered by the old Display Log (DSPLOG) CL command. In previous installments of APIs by Example, I’ve presented a number of APIs and accompanying utilities that demonstrated the enhancement opportunities that more recent APIs often make available to API programmers, in comparison to older CL command counterparts.

In today’s article, I continue this effort, taking advantage of the QMHOLHST API. In addition to an array of typical Open List API parameters, this API also includes a couple of parameters that let you configure the API output. You can control both the CCSID and the time zone applied to text- and time-related return information, respectively. I tie all this together in the new Display History Log (DSPHSTLOG) command that I present today and continue in an upcoming issue of this column.

As I’ve demonstrated in earlier APIs by Example articles, using APIs also offers opportunities in terms of adding to the information being displayed or listed as a result of the API-driven utility developed. In this case, the DSPHSTLOG command’s list panel includes a separate list view immediately revealing the message ID, severity, and type, as well as sending time and job information. This is the intriguing part of API programming, the ability for you to tailor the functionality and usability to meet your exact requirements, thereby surpassing limitations imposed by the system’s native offering.

Download the save file containing the source code.

Read the entire article.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s