• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • The Missing RPG OA Puzzle Piece

    March 6, 2017 Dan Burger

    RPG Open Access is a technology that was introduced with much fanfare with the IBM i 7.1 release of the operating system. That was in 2010. A handful of software vendors showed what it could do by using it in their application modernization tool kits as a means to get beyond screen-scraping and actually control the user interface.

    Now RPG OA is seven years old and not a lot has changed. A few more vendors have incorporated it as a method for creating user interfaces. The potential for RPG OA is mostly unrealized and it remains unrecognized by the majority of RPG programmers.

    “It’s scarce, but not as scarce as it seems because what’s out there doesn’t get talked about,” says RPG OA optimist Trevor Perry. “There are two things missing from the RPG Open Access conversation. Had they been part of the conversation from the start, I think OA would have been received very differently.”

    From the start, RPG OA was chosen by several vendors to help create browser interfaces for green-screen applications. Those modernization tools–first released by Profound Logic and followed by looksoftware, ASNA, and BCD–hogged the headlines and led to a misconception that open access was only a method for obtaining a graphical user interface.

    What was lost, Perry says, is that all the I/O in RPG can be enhanced with open access. Therefore, a lot of value was undiscovered. Physical files, tables, and printer files all leverage IBM i input/output, just to name a few examples.

     

    Not everyone knew this seven years ago, and many may not know it now. Illumination by IBM i marketing is more like a candle in the dark than a beacon on a hill. The word got out, Perry says, but it didn’t travel far. Most programmers weren’t interested in creating their own graphical user interface and many were angry that IBM didn’t do this work themselves and deliver it to the users.

    With the focus on the user interface came the realization that developing a GUI using RPG OA was a tough assignment. The RPG program is talking to a display file and the display file has to take a lot of things into account. The application tool vendors did the work, knowing the average RPG programmer was unlikely to take on the task. Perry believes this led to the misinformed conclusion that RPG OA was overly complex.

    “The first visibility of open access gained it a reputation of being very complex and required a lot of thinking. And that’s because the focus was on the user interface part of the open access equation,” Perry explains. “One of the things you can do with input/output is restructure a database. It can be done without having an impact on the existing RPG. “There’s no need to add or change logic for every program. The output handler for the database is so simple, but no one is talking about it. A database just requires output to create a table. It doesn’t require the complexity. Just needs an array of the data and the field names. It’s a simple matter of reading arrays.”

    For those unfamiliar with RPG OA, a “handler” is a program that allows RPG to communicate (via the DDS I/O buffer of RPG) with resources and devices that were prohibited by the DDS limitations in the past. Any I/O operation within RPG can be sent to an RPG OA handler as opposed to being sent to the operating system.

    Dan Cruikshank, a member of the DB2 for i Lab Services team has been modernizing databases for IBM midrange shops for nearly 20 years using SQL and data-centric programming. Applying RPG Open Access to this task has made it much easier, he says. There is code available that can help, and by reusing components Cruikshank transforms RPG I/O to an I/O call using the call-level interface, which has been on the platform for many years. The process eliminates rewriting code from scratch.

    The benefits include enhanced developer productivity, improved application performance, attributable to reduced CPU consumption and disk I/O operations. The greatest benefit of all is keeping data on the IBM i platform.

    At tech conferences like the upcoming COMMON Annual Meeting and Exposition happening from May 7 to 10 in Orlando, Florida, Perry presents a session called Open Access: Easier Than Pi. In case you don’t know, pi is the ratio of a circle’s circumference to its diameter. The ratio is 3.1415. When he wrote his sample RPG OA handler for the presentation, it took three hours and eight minutes. That’s 3:08 compared to pi, which is 3.14. Therefore, Perry postulates, writing an RPG OA handler is easier than pi. It’s a bit of a stretch, but it is a good conversation starter and probably works better than a story about how long it took to bake a pie.

    In a green-screen environment, subfiles are accessed one page at a time. In an open access environment, with the right RPG framework and handler, the entire data set that was built is accessible. The performance difference is dramatic, Perry says. It eliminates the back-and-forth between the user and the host. All the data is at the user interface and every bit of data can be sorted by column.

    “That is a request many users have,” Perry says. “The number of people who want this is about 100 percent. The number of people who realize an open access handler can do this is about three percent.”

    At one of Perry’s Easier Than Pi sessions, attendees take away some code and the knowledge to write a handler.

    “I show them how quickly and easily RPG OA can be used,” he says. “You could write one handler and plug it into all or your output,” he says. However, you would likely want to do some customizations in the various instances. One handler might work in 90 programs and that handler could be tweaked to run in three or four other programs and that handler could be tweaked again to work with six other programs. It’s like writing RPG with a fancy input parameter.”

    Perry is noodling the idea of placing one of his simple handlers into the open source community as a template that programmers could use as is or build upon. He is keen on the idea that an initial RPG OA conversation with programmers will lead to the recognition that the technology has undiscovered capabilities with important benefits.

    RELATED STORIES

    RPG OA: Open Opportunity, Open To Interpretation

    RPG Open Access: You Don’t Know What You Don’t Know

    Open Access Handles The Queue

    DB2 For i Modernization Gets Assist From RPG OA

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags: Tags: IBM i, RPG, RPG OA, RPG Open Access

    Sponsored by
    Rocket Software

    Meet digital age demands while maximizing your IT investment.

    Future-proof your mission-critical applications with Rocket® Solutions for IBM® i that keep your business ahead of the curve.

    Learn More

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Guru: The PHP Path To Victory, Part 1 IBM i License Transfer Deal Comes To The Power S812 Mini

    4 thoughts on “The Missing RPG OA Puzzle Piece”

    • Felix Catagena says:
      March 6, 2017 at 9:21 am

      I am all for KISS, keep it super simple (click, download, install and use).

      Reply
    • jonboy49 says:
      March 6, 2017 at 10:59 am

      There’s already an Open Access template available in the community – mine!

      You can read about it here: http://www.ibmsystemsmag.com/ibmi/developer/rpg/open-access-templates/

      The actual downloads are here: http://www.partner400.com/Examples/OATemplates.zip

      Time Trevor and I compared notes!

      Reply
      • Trevor says:
        March 6, 2017 at 6:19 pm

        Jon, I used your templates and articles to build mine. The end result is a little different – my initial handlers produce XML and HTML output. The next generation will include some DB examples.

        I will be presenting my (upgraded) session at the WMCPA 2017 Spring Conference – https://wmcpaspringconference2017.sched.com/event/9vPt/rpg-open-access-write-your-own-handler

        Reply
    • Terry says:
      March 7, 2017 at 2:32 pm

      Always wanted to look into this but us COBOL’ers were left out of the equation 🙁

      Reply

    Leave a Reply Cancel reply

TFH Volume: 27 Issue: 14

This Issue Sponsored By

  • Fresche
  • ProData Computer Services
  • COMMON
  • Linoma Software
  • Northeast User Groups Conference

Table of Contents

  • IBM i License Transfer Deal Comes To The Power S812 Mini
  • The Missing RPG OA Puzzle Piece
  • Guru: The PHP Path To Victory, Part 1
  • IBM i Cloud Providers React To Amazon S3 Outage
  • Servers Hit The Skids Last Year, This Year Might be No Better

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • POWERUp 2025 –Your Source For IBM i 7.6 Information
  • Maxava Consulting Services Does More Than HA/DR Project Management – A Lot More
  • Guru: Creating An SQL Stored Procedure That Returns A Result Set
  • As I See It: At Any Cost
  • IBM i PTF Guide, Volume 27, Number 19
  • IBM Unveils Manzan, A New Open Source Event Monitor For IBM i
  • Say Goodbye To Downtime: Update Your Database Without Taking Your Business Offline
  • i-Rays Brings Observability To IBM i Performance Problems
  • Another Non-TR “Technology Refresh” Happens With IBM i TR6
  • IBM i PTF Guide, Volume 27, Number 18

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle