In OPM, program creation consists of compiling source code into runnable program objects (*PGM). A program object is created from a single source member using the Create RPG Program command (CRTRPGPGM).
By contrast, in ILE, program creation consists of:
One way to create an RPGIV program object is the same way you create an RPG program in the OPM framework: using the CRTBNDRPG command. This command creates a temporary module that is bound into a program object and later deleted. This is the quickest and simplest way to create an ILE program.
Another way to create an RPGIV program object is using separate commands for compilation and binding. In this two-step process, you create a module object with the Create RPG Module command (CRTRPGMOD). This command compiles the source statements into a nonrunnable module object, which must be bound into a program object with the Create Program command (CRTPGM).
ILE also lets you bind other objects using a binding directory. A binding directory is essentially a "list" of modules that may be needed when the program runs. When the CRTBNDRPG command specifies a binding directory, the compiler or binder searches the binding directory to see if the program being compiled accesses any modules in the directory. If it does, the compiler or binder binds them to the program. A binding directory can reduce program size because the modules or service programs in a binding directory are used only when needed. For more information about the binding directory, see the section The YBNDDIR Model Value.
CA 2E lets you define a function as either a module or a program. During the source generation and compilation steps, the RPGIV ILE generator ensures that references to bound objects are correct and creates either a program object (*PGM) or a module object (*MODULE). Created modules can be bound to created programs during compilation, either explicitly or through the default CA 2E binding directory.
|
Copyright © 2014 CA.
All rights reserved.
|
|