RPG Open Access - So Misunderstood!

We heard recently from someone who ran into difficulty using code from one of our recent articles on Open Access because they didn't have the required library QOAR on their system. So they contacted IBM support for help.

I suspect some of you may be anticipating that the response was something akin to "What's Open Access?" or even "What's RPG?" on the part of the support person. But that's not the case at all. The person responding clearly knew about RPG Open Access and that it was once a product but is now available and enabled via PTF for 6.1 and 7.1 systems and provided the PTF information to the person asking for help.

So far, so good.

But then the support person went on to actively discourage the questioner from using some of those PTFs to write her own handler.

She was told: "Generally people looking for 5733OAR PTFs are looking for the runtime PTFs because they are getting a 'handler' from a third party. It is possible to create your own handler, but this is a monumental task, most customers purchase a handler from a third party (a list of companies offering OA handlers for replacing 5250 interfaces with Web or mobile interfaces was included). I am not aware of any customer who has written their own handler other than those above."

<sigh> So apparently we were wasting our time in providing templates to help people write their own OA handlers, including an example of a handler that formats and writes to a CSV file in the IFS. Or this one with an example of a handler that reads IFS files. Or this one with an example of reading and writing data queues.

And there are more examples--both from us and from others--making use of Open Access to simplify RPG applications using handlers, all of which are far from monumental tasks.

We’re not just picking on IBM here because this seems to be a pervasive misconception about OA--that it's all about getting rid of green screens easily--period. Sure, companies such as Profound Logic, look software, ASNA, Rocket and others have done some amazingly advanced things along those lines utilizing OA handlers. And we also encourage shops that are looking to replace green screens with another interface to use one of those products rather than write their own OA handlers for that specific task.

This is not, however, because writing an OA handler is a monumental task. The monumental task is trying to come up with and implement a generic handler that can render any user interface that was originally designed for 5250 on the myriad types of Web and mobile interfaces out there.

Yes, writing an OA handler often requires a comfort level with pointers that many RPGers may not have but can easily gain with a little practice and some good examples. For that matter, using the templates we provide, one really needs only a basic understanding of pointers.

For the most part, the challenge in writing an OA handler is mostly related to how the handler does whatever functionality it needs to do (e.g., talk to the IFS or data queues or a Web service or a mobile device). Doing those kinds of things in an OA handler is no more difficult than doing those same things in any other RPG program.

So don't let IBM or anyone else convince you that writing an OA handler is incredibly difficult. Ironically, we feel that OA's primary value is in simplifying RPG applications, not complicating them. Get the nitty-gritty API-handling details out of the main RPG programs and put it into an OA handler so that the RPG apps that need to use that functionality can concentrate on business application logic.

And don't let anyone convince you OA is all about doing away with green screens. It has been used for that very successfully. But it can be equally effective at simplifying many other kinds of ordinary application logic.

We'd love to get the word out about the other ways that OA has been used. If you have an example of an OA handler you've written, or even just one that you're thinking about writing, let us know in the comments. You don't need to share your code, just the concept. We're sure there are many more examples of non-monumental ways OA has been used to simplify RPG apps.