Dan Cruikshank, one of IBM's leading DB2 experts, and a fellow member of the Modernization Redbook team, wrote to us after the piece was published. He pointed out that while data queues were an excellent example of how OA can be used to simplify things, the interface to almost any list API could benefit from the development of an OA handler. For example, wouldn't it be nice to be able to process a list of spoolfiles that meet certain criteria by using SETLL to set up the criteria, followed by a series of READ or READE operations to retrieve the data. Dan is no newcomer to using OA to adapt existing processes and has written several articles on database modernization using OA. For an example see his article on using SQL with OA on Developerworks.
The more we thought about Dan's comments the more we realized that he was right. After all, how many programmers do you know who still persist in using the outfile support from IBM i commands rather than use the more efficient and more capable related APIs? Would they be more inclined to abandon their old habits if there was an OA handler available for the API in question that would allow them to process the results with familiar RPG op-codes? We think the answer is yes.
So we've been busily working on a sample OA handler that supports CHAIN, SETLL and READ operations against a simple list. The idea being that the basic principals can be adapted to processing any list--no matter how it is derived. We'll be publishing the related article in an upcoming edition of IBM i EXTRA so you might want to watch out for that. (Editor's note: If you don't currently receive the IBM i EXTRA newsletter, you can subscribe here.)