APIs by Example.
If you want to monitor and register activity, resource allocation, and security- or audit-related events on IBM i, many different options exist to do so, including exit points, history logs, system message queues, and system journals. All these facilities are readily available on your system at no extra cost beyond the effort of filtering and presenting the relevant information. Because an IBM i system running a full production workload can generate a heap of information, gleaning valuable knowledge and the control needed to properly manage your IBM i system might require an API programmer’s skills.
In this APIs by Example, I show you how to use the Retrieve Journal Entries (QjoRetrieveJournalEntries) API to immediately extract and select job resource information from the system accounting journal QACGJRN. The point of this exercise is partly to demonstrate the QjoRetrieveJournalEntries API and partly to provide an example of how to make extracted system information accessible and useful via a CL command interface and a User Interface Manager (UIM) list panel. To that end, I’ve written the new Analyze Job Accounting Journal (ANZJOBACG) command. (See “Find Out More,” below, for resources that cover other methods of accessing job resource information, as well as resources for extracting information from system journals by using APIs or exit programs.)
Download the save file containing the source code.