PROJECT: UPDATING LEGACY INTERFACE
Our client has a fairly up-to-date IBMi computer running a highly customized ERP package. (IBMi is the current name of the operating system that is the successor to the line of computers formerly known as AS/400, iSeries, and System i.) These computers are sometimes referred to as "legacy" or "outdated" computers, but that is not really fair. If the computer is running a fairly current version of the operating system, IBMi is quite capable of handling very modern applications. Many of the applications run on these systems today are old, but they are working well, they fit the business like a glove since there have been many years of tweaks, and they are very efficient since they were written for less powerful computers of the past. However, the applications were written for character based (green screen) interfaces, so they look old fashioned. Our client did not want to buy, and then customize, a new ERP package just to modernize the interface, but they wanted better output of their valuable information.
IBMi includes an excellent web server and RPG (the programming language most used on the IBMi) can easily output web pages. IBM has done a fantastic job of modernizing the capabilities available in RPG.
A simple example is shown to the right. This program replaced three green screen queries, and the user does not have to do the addition. Yes, this is text, so what is new? Note the variety of font sizes and colors, the fact that this output is sized to fit a smart phone screen, and that there are links. These links call other programs to drill deeper into the data. This data is accessed in real time, directly from the database used by the ERP package. One thing you cannot see from this screen shot is that the data is automatically refreshed every few minutes to stay current. At month end, executives have this up all day on their phones to see how the company is doing on making their numbers for the period.
Consider the following more complex example:
Now this is making good use of the graphical user interface (GUI). Again, this is output from an RPG program that is directly accessing the database used by the ERP package. However, in this example, the data displayed in monthly data, so there is no need to access up to two years of data in real time for each use of this graph. Processing that much data slows the response and adds to the load on the system. Therefore, the RPG program creating this page is run periodically for the most often used selection criteria to output the page as a static page that is served by the web server whenever requested. Including this capability adds only about ten lines to the program and less than that to the HTML.
In a live display of this graph, as opposed to the screen shot above, using the mouse to hover over a bar or a point on the graph will cause the actual number being graphed to be displayed on the screen.
Also, please note the button labeled "Show data". This allows the user to see, in table form, the actual data behind the graph, and to copy and paste the data into a spreadsheet if they wish to do further analysis. It also allows the data presentation to include links, so that the user can easily drill down for the details behind a number.
Another good use of of a GUI is to display pictures:
This screen is taken from program accessed on a tablet carried by tool movers. "Tool Reqs" referred to in the title are requisitions for tools to be moved to or from production. The tab shown for pictures helps the tool mover recognize the tool he is to move. This screen is created by an RPG program that accesses a directory of pictures associated with a tool and shows them on a web page. It is not limited to one picture as shown in this example. If there are multiple pictures in the directory, it will show them all.
This program does more than display data. It also allows the user to record the movement of the tool. One touch on the tablet records that the tool has been picked up, and another touch records that it has been delivered, and this activity is immediately visible to all users via the history tab on this screen or through other inquiry programs.
What about more complex input? Here are example screens from inquiry and maintenance programs:
This screen provides a list of the items in a file. Clicking on the "Selection" bar to the left allows the user to control what is shown in this list, including the number of lines to show on one screen. (Using a web browser as the client eliminates the green screen restriction of only being able to display 24 or 27 lines on the screen.)
In this case, the user can view, edit, or delete any of the items shown. In addition, there is an "Add" button at the bottom that the user can click to create a new record in the file. Once the user clicks "Edit" or "Add", more advantages of the web interface appear:
Note the date and time pickers. The date picker appears when the cursor is placed in the date field. Other tools familiar to today's users include the radio buttons and pull down boxes partially obscured in this picture by the date picker. (When the user leaves the date field, the date picker disappears and these features are fully visible.) On the pull down boxes, the options may be static or dynamic. Also, if the user has more to say in the description field than will fit in the space provided, a scroll bar will appear and the user can continue typing. On a green screen display, it is much more difficult to scroll and the user interface is not as easy for the programmer or the user.
Tools:
- Apache web server: The web server used is included with the operating system in the last several versions. It is the same web server used on many other types of computers -- very robust, familiar to many system administrators (even if they are not familiar with IBMi) and very capable. (IBM's Websphere Application Server is not required using these techniques.)
- Standard web coding tools: The output sent to the browser is standard web pages that any standard browser can display. This output includes hypertext markup language (HTML), cascading style sheets (CSS), and JavaScript. The CSS is static output, as is much, but not all, of the JavaScript. Most of the HTML is dynamically produced by RPG programs.
- RPG, specifically the latest iteration of the language - RPG ILE: Most of the RPG programs use embedded SQL to access and update data in the database. This is not exclusive to the web environment. While many programs currently in use were written before this tool was well developed, it is becoming the normal method for database access in modern programming. Note: Two tools normally used with RPG on the IBMi are not used as much in the web browser environment. Green screen output is normally specified using data description specifications (DDS). Since there is no green screen to specify, DDS is not needed for that purpose. Control Language (CL) is used to assemble a series of commands and programs into a procedure. In the web environment, the server is normally responding to a request with a web page (or a section of a web page), so there is no need for CL to string numerous commands together. Of course, it is quite easy to allow a user to request a report from a web page, and then use CL to process that request in a batch process.
Note that all the tools listed are free or are already being used if programming is being done for the green screen interface. Even if programming is not being done, Dossin Business Solutions, Inc. has the compilers needed for creating RPG programs, so retaining us to do this modernization would not require buying those tools.
In many cases, this approach can be far more cost-effective than replacing an entire ERP system, particularly if the decision is to upgrade only a portion of the screens based upon the specific needs of the company, or to just start using a modern GUI interface in new programs.
If you need help with IBMi interface modernization, please contact Dossin Business Solutions, Inc. using the phone number or the e-mail address below.