Putting APIs to work can be challenging. APIs return data in different formats using a variety of methods, and some APIs have complex parameter lists. Additionally, finding out exactly what an error message is trying to tell you is not always immediately obvious. But as you move along and gain experience, you will learn where to begin searching for information and how to tackle problems as they emerge.
One type of API called the Open List APIs offers a rich set of functions and a wealth of filter parameters, which let you zoom in on the exact subset of list entries that your program or utility is targeting. These APIs also have a sort information parameter, letting you sort the returned list in any sequence you could possibly want. Further, where appropriate, you can specify which fields the API should return in its return data parameter, thus the API can avoid spending CPU cycles to retrieve information for which you have no use. And finally, the Open List APIs can build the open list asynchronously in the background. This means that you can start processing the list before it’s complete so that the building and the processing of the list occur in parallel, further speeding up the overall process.
IBM originally developed the Open List APIs to support client/server applications, and it put a lot of effort into making the Open List APIs as flexible and functional as possible. System i Navigator is one example of a client application that takes advantage of the Open List APIs. (One important note is that before release V5R3, the Open List APIs were all part of the Host Server (5722-SS1 option 12) of the operating system and located in library QGY. As of V5R3, the Open List APIs have been integrated in the base OS. If you are on V5R2 or earlier, you can use the Display Software Resources (DSPSFWRSC) command to verify that option 12 is installed.)