Compile CL procedures

A CL source procedure must be compiled into a module and bound into a program before it can be run.

To create a CL program in one step, you can use the Create Bound Control Language Program (CRTBNDCL) command and create a bound program with one module.

You can also create a module with the Create Control Language Module (CRTCLMOD) command. The module must then be bound into a program or service program using the Create Program (CRTPGM) or Create Service Program (CRTSRVPGM) command.

The following example creates the module ORD040C and places it in library DSTPRODLB:

CRTCLMOD     MODULE(DSTPRODLB/ORD040C) SRCFILE(QCLSRC)
             TEXT('Order dept general menu program')
 

The source commands for ORD040C are in the source file QCLSRC, and the source member name is ORD040C. By default, a compiler listing is created.

On the Create Bound Control Language Program (CRTBNDCL) command, you can specify listing options and whether the program should operate under the program owner's user profile.

A program can run using either the owner's user profile or the user's user profile.

CL procedures and programs are created using options on the Programming Development Manager (PDM) menu or the Programmer Menu so the Create Control Language Module (CRTCLMOD) command or Create Bound Control Language Program (CRTBNDCL) command does not have to be directly entered.

Related information
CL command finder
Create Program (CRTPGM) command
Create Bound CL Program (CRTBNDCL) command
Create CL Module (CRTCLMOD) command
Create Service Program (CRTSRVPGM) command