IBM Support

Samples of Open Access: RPG Edition

General Page

You are in: RPG Cafe > Samples of Open Access: RPG Edition

Short URL: http://ibm.biz/rpg_open_access_samples

RPG Cafe: Open Access Samples

Samples of Open Access: RPG Edition

Attached is a .zip file containing save file oardemo.savlib.savf. The save file contains library OARDEMO, saved for V6R1M0. The library contains two files.

  • The README file contains the information below.
  • The SOURCE file contains all the source needed to run the demo, and two CL programs that create the demo programs and service programs.

Disclaimer: The sample handlers are only intended to show the basics of how the handlers interact with the handler parameters. The handlers are not robust, and they don't necessarily use the best mechanism for dealing with the handler parameter. For example, the "web service" handler in the second sample uses name-values for the I/O operations just for the sake of showing how to use the name-value information. But the handler is hardcoded to deal with a particular file, so it would be much easier for it to use the I/O buffers directly.

File SOURCE contains two CLP source members. Compile these two programs and call them to create the programs and service programs for the demo.

  • SUBF_BLD
  • WSCV_BLD

There are two "applications". Their purpose is to show how the handlers interact with the handler parameter, not to show how the handlers actually do their magic with the outside world. In both cases, the handler actually just uses the DSPLY operation to interact with the outside world.

Recommendation: Step through the RPG programs in the debugger, stepping into each I/O operation, to see the handlers in action.

The "applications"

  1. A program that uses an open-access display file with a subfile, where the open-access handler uses data structures for the I/O operations. The handler uses the DSPLY operation to "show" the subfile to the user.
    ==> call OARDEMO/SUBF_PGM
  2. A program that uses an open-access keyed disk file, which pretends to do a "web service" interaction. The handler uses name-value information for the I/O operations. The handler does not actually interact with a web service; instead, it uses the DSPLY operation to interact with the user, where the user is pretending to be a web service.
    ==> call OARDEMO/WSVC_PGM

Attachments

  1. oardemo.zip

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SS69QP","label":"Rational Development Studio for i"},"Component":"ILE RPG Compiler","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
13 December 2019

UID

ibm11118289