All programs are created in steps.
- Source creation. CL procedures consist of CL commands. In most
cases, source statements are entered into a database file in the logical sequence
determined by your application design.
- Module creation. Using the Create Control Language Module
(CRTCLMOD) command, this source is used to create a
system object. The created CL module can be bound into programs. A CL module
contains one CL procedure. Other HLL languages may contain multiple procedures
for each module.
- Program creation. Using the Create Program (CRTPGM) command,
this module (along with other modules and service programs) is used to create
a program.
Note: If you want to create a program consisting of only one CL module,
you can use the Create Bound CL Program (CRTBNDCL) command,
which combines steps 2 and 3. If you want to create an OPM CL program from
the CL source statements, you can use the Create CL Program (CRTCLPGM) command.