Recently we got a question about IBM's OpenAccess support. So, to understand integration possibilities, the question is what is OpenAccess?
Simply put, OpenAccess is fantastic tool that will allow RPG program to become kind of Web service providing data in HTML, XML or JSON form. It is many more than that, but let's focus on XML and JSON format.
As Green Screens Web Terminal is, well, web based and RPG program with OpenAccess Handlers are web accessible, only the sky is the limit.
In previous blogs we showed how easy is to call custom browser script from your terminal session.
Let's look at those examples first...
// start remote command organizer STRPCO // send screen blink + beep signal STRPCCMD PCCMD('script:$(".view").fadeIn(50).fadeOut(50).fadeIn(50).fadeOut(50).fadeIn(50);Tn5250.OIA.beep();') // show message box to the user STRPCCMD PCCMD('script:Tn5250.Prompts.message(''Info'', ''Houston we have a problem'')') PAUSE(*NO) // start printer session spool 2 web pdf (must be configured, and not already in use) STRPCCMD PCCMD('script:Tn5250.Application.startPrinter(''PRT01'')') PAUSE(*NO)
Now, imagine you have compiled your RPG program with OpenAccess Handlers to render XML document from url link.
For example, to open XML document for monthly sales http://mysystem/sales?year=2016&month=12
we have two approaches.
Open in new tab (mobile version will open inside browser)
Now, let us give you some more ideas to think about...
Spool modernization - render HTML spool as described in previous blogs and add interactivity with OpenAccess URL links. For example, when user click on some record, pickup record data, retrieve additional info from OpenAccess RPG program with help of AJAX and render popup box. Or integrate with PayPal payment mechanism to automatically update record in database. This will bring interactivity to old green screens spool files.
Display subfile and click support. By double clicking on any part of the screen, web terminal will send ROW/COL position to RPG program. This can be detected and according to position, we can identify which record is clicked. Then, we can call STRPCCMD with custom function call to show for example product image in separate window etc.
With our screen modernization engine, use OpenAccess links as embedded inside modernized screens, clicking on action will provide you with additional record data or even direct processing integration. With this approach we have two new exciting features - modernized legacy screens and non-gui RPG programs for integrated data processing.
We hope that with ideas presented here we manage to provide a good insight into new possibilities which our web terminal gives especially when interconnected with OpenAccess services.