POWER > Web 2.0 > Mobile Web

RPG Program Gives Mobile Access to IBM i Data

IBM i Mobile Access

As it becomes more important (and necessary) to stay connected, it’s equally important for IT staff to provide users with the tools they need to achieve that. These days, we expect to be able to get information at any time and need to respond quickly if an issue arises. Sure, we could power up the laptop and sign on to the IBM i to get what we need, but what if we could take care of business right from our phone? It’s true that it may only save a few minutes, but sometimes minutes count.

Think of the possibilities here: Wouldn’t it be great to check the latest sales figures or the status of an order from your phone? Perhaps you want to see how your sales people are performing. How about checking performance statistics of your IBM i? You might be thinking, “Can I really do this all from my phone?” The answer is yes and providing this type of information is much easier than you may think. In fact, you probably already have some of what you need.

Simple Tools Are All You Need

All that’s required to connect to IBM i from your mobile device is an RPG program to retrieve data, a web service to access the data and an app to present it. You likely already have RPG programs built to provide important metrics to your business. You may or may not have web services created over them, but a tool like Integrated Web Services (IWS) makes this really easy.

What’s more, it’s likely that IWS is already available on your IBM i. So, with an RPG program and web service in place, the only remaining task is to create an app to consume a web service. The app can be built on any platform or device. It can be a phone or tablet: Apple, Android or Windows*. The OS really doesn’t matter, and that’s the beauty of this approach. For this article, I built an iPhone app, but the concept would be the same for other devices and platforms, such as Android.

Your Roadmap to Mobile

In today’s world, we need to be able to access data at any time—as quickly as possible—in order to conduct business. Here’s what’s necessary to access data from your organization’s IBM i via a mobile device:

  • Determine what business metrics you want to provide to end users via a mobile platform
  • Define the data elements that are most important to show to end users on the app
  • Design the flow of how data will be presented to the end user
  • Build a new RPG program or repurpose an existing program that produces the desired data and metrics
  • Create a web service. The web service can be created using the RPG program built to address the business need. This service can be created easily using IWS. IWS is a wizard-based tool that steps you through the process to create a fully functioning web service from an integrated language environment object. It can create both SOAP and REST web services.
  • Build an app. The app consumes the web service and shows the data in a user interface. The app discussed in this article was built for an iPhone, but by using a web service, it can be built on any platform or device. I used Xcode as the IDE to build the app for this article.

Providing access to your data on a mobile device can make it easier for people to answer a question, react to an issue or keep your business up and running. In addition, it can also help in the sharing of information for analytic or reporting purposes. Using the strategy laid out in this article, I was able to create an app that provides pertinent information from an item master system. Visit “Build an App to Access IBM i Data From Your iPhone,” the online companion to this article, to learn about the tools and knowledge necessary to build your own app to support your business.

Mike Larsen is a senior IBM i programmer and project manager for Central Park Data Systems.

comments powered by Disqus



2019 Solutions Edition

A Comprehensive Online Buyer's Guide to Solutions, Services and Education.

IBM Systems Magazine Subscribe Box Read Now Link Subscribe Now Link iPad App Google Play Store