RPGBeans.com Documentation
The basic how-to guide
Creating an Encapsulating Service Program object requires several steps performed in a certain order:
- Create the module Source Member - this is the main gist of the RPGBean Creator (CRTRPGBEAN) Command.
- Create the prototype /copy member - this functionality is optionally available in CRTRPGBEAN or can be called directly by running the Create Prototype Member (CRTPTYPMBR) Command.
- Create the *MODULE object - use either CRTRPGMOD or CRTSQLRPGI. Since the current version of CRTRPGBEAN only supports SQLRPGLE, you will need to use CRTSQLRPGI if you are using a source member generated by the CRTRPGBEAN command.
- Create the Binder source - While there are other ways to create a service program, I highly recommend that you learn about Binder Source. If this is a new Service Program, the simplest way to create the binder source is to run the IBM supplied RTVBNDSRC command.
- Create the Service Program - use the IBM Supplied CRTSRVPGM command. Be sure to reference the Binder Source you just created and pay close attention to the Activation Groups.
Once these steps are complete, you should have a Service Program that is ready for use. Links to detailed information regarding the
RPGBean Creator commands are provided below.
Supplied Commands
The library currently ships with two commands:
- CRTRPGBEAN (Create RPG Bean) - This command will analyze a database file and create an SQLRPGLE source member that encapsulates the database file. The command acts on templates so that the programmers can customize and standardize the resulting code.
- CRTPTYPMBR (Create Prototype Member) - This command will analyze an RPGLE or SQLRPGLE source member and produce a /copy source member of all the exported procedures. NOTE: this command should work over any source member and is not restricted to use within the RPGBean framework.