IBM AS/400 Frozen Dessert Maker User Manual


 
ILE Program Using CRTBNDRPG
Related Information
Converting to RPG IV “Converting Your Source” on page 382
One-step creation process Chapter 6, “Creating a Program with the
CRTBNDRPG Command” on page 57
ILE static binding Chapter 10, “Calling Programs and
Procedures” on page 127; also
ILE Con-
cepts
Exception handling differences “Differences between OPM and ILE RPG
Exception Handling” on page 222
Strategy 2: ILE Program Using CRTBNDRPG
Strategy 2 results in an ILE program that can take advantage of ILE static binding.
Your source can contain static procedure calls because you can bind the module to
other modules or service programs using a binding directory. You can also specify
the activation group in which the program will run.
Method
Use the following general approach to create such a program:
1. If starting with RPG III source, convert your source to RPG IV using the
CVTRPGSRC command.
If converting, be sure to convert all /COPY members and any programs that are
called by the source you are converting. Also, if you are using CL to call the
program, you should also make sure that you are using ILE CL instead of OPM
CL.
2. Determine the activation group the program will run in.
You may want to name it after the application name, as in this example.
3. Identify the names of the binding directories, if any, to be used.
It is assumed with this approach that if you are using a binding directory, it is
one that is already created for you. For example, there may be a third-party
service program that you may want to bind to your source. Consequently, all
you need to know is the name of the binding directory.
4. Create an ILE program using CRTBNDRPG, specifying DFTACTGRP(*NO), the
activation group on the ACTGRP parameter, and the binding directory, if any,
on the BNDDIR parameter.
Note that if ACTGRP(*CALLER) is specified and this program is called by a
program running in the default activation group, then this program will behave
according to ILE semantics in the areas of override scoping, open scoping, and
RCLRSC.
The main drawback of this strategy is that you do not have a permanent module
object that you can later reuse to bind with other modules to create an ILE
program. Furthermore, any procedure calls must be to modules or service pro-
grams that are identified in a binding directory. If you want to bind two or more
modules without using a binding directory when you create the program, you need
to use the third strategy.
Chapter 3. Program Creation Strategies 25