CRTCLMOD (Create Control Language Module)

CRTCLMOD Command syntax diagram

 

Purpose

The Create Control Language Module (CRTCLMOD) command creates a control language (CL) module from the specified CL source member. The command is valid in batch and interactive jobs, and in both compiled and interpreted CL.

 

Required Parameters

MODULE
Specifies the qualified name of the CL module being created.

The name of the module can be qualified by one of the following library values:

*CURLIB: The module is created in the current library for the job. If no library is specified as the current library for the job, the QGPL library is used.

library-name: Specify the name of the library where the module is created.

module-name: Specify the name of the module being created.

 

Optional Parameters

SRCFILE
Specifies the qualified name of the source file that contains the CL source module being compiled. The module is known by the name given in the MODULE parameter.

The name of the source file can be qualified by one of the following library values:

*LIBL: All libraries in the job's library list are searched until the first match is found.

*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.

library-name: Specify the name of the library to be searched.

QCLSRC: The IBM-supplied source file, QCLSRC, that contains the CL source member being compiled is used.

source-file-name: Specify the name of the source file that contains the CL source member being compiled. The source file can be a database file, a device file, or an inline data file.

SRCMBR
Specifies the name of the member of the source file that contains the CL source member being compiled.

*MODULE: The CL source member being compiled is in the member of the source file that has the same name as that specified on the MODULE parameter for the compiled module.

source-file-member-name: Specify the name of the member that contains the CL source, if the member name is not the same as the name of the module being created.

TEXT
Specifies the text that briefly describes the compiled CL module. More information on this parameter is in Commonly used parameters.

*SRCMBRTXT: The text is taken from the source file member being used to create the CL module. If the source file is an inline data file or a device file, the text is blank.

*BLANK: Text is not specified.

'description': Specify no more than 50 characters of text, enclosed in apostrophes.

OUTPUT
Specifies whether or not a compiler listing is produced.

*PRINT: The compiler listing is produced. The information contained in the listing is dependent on the values specified on the OPTION parameter.

*NONE: The compiler listing is not produced. When a listing is not required, this option should be used because compile-time performance may be better.

OPTION
Specifies the types of output lists created when this command is processed and whether a program is created. A maximum of four of the following values can be specified in any order on this parameter. If neither or both of the values in each group are specified, the underlined value is used.

Note: The underlined values for this parameter are similar to, but not actually default values, and therefore, cannot be changed with the Change Command Default (CHGCMDDFT) command.

Module Creation Options

*GEN: All phases of the compilation process are carried out.

*NOGEN: Compilations stops after syntax checking. No module is created.

Cross-Reference Options

*NOXREF: No cross-reference list of references to variable and data items in the source is created.

*XREF: A cross-reference listing of the source program is produced. OUTPUT(*PRINT) must be specified.

Second-Level Message Text Options

*NOSECLVL: No second level message text is printed.

*SECLVL: Second-level message text is printed. OUTPUT(*PRINT) must be specified.

Event File Creation Options

*NOEVENTF: The compiler will not produce an event file for use by the CoOperative Development Environment/400 (CODE/400) product.

*EVENTF: The compiler produces an event file for use by the CODE/400 product. The event file will be created as a member in the file EVFEVENT in your source library. The CODE/400 product uses this file to offer error feedback integrated with the CODE/400 editor. This option is normally specified by the CODE/400 product on your behalf.

LOG
Specifies the logging options for a created CL module.

*JOB: Logging of commands in a running CL module depends on the status of the job's logging flag (see the LOGCLPGM parameter of the Change Job (CHGJOB) command). To list the logged commands, the logging level of the jobs must be 3 or 4.

A *YES or *NO value takes precedence over any value specified in the CHGJOB command.

*YES: The commands are logged in all cases.

*NO: The commands are not logged.

ENBPFRCOL
Specifies whether collection of performance data is enabled.

*PEP or *NONE: Performance data is collected for the Program Entry Procedure entry and exit. There are no entry or exit hooks in the module's internal procedures and no precall or postcall hooks around calls to other procedures.

*FULL: Performance data is collected for procedure entry and exit. Performance data is also collected before and after calls to external procedures.

REPLACE
Specifies whether an existing module is replaced if a module with the same name already exists in the specified library.

*YES: The existing module is replaced by moving it to the QRPLOBJ library.

 

Notes

  1. If a running CL module is recompiled with *YES specified for the REPLACE parameter, message queue errors may occur in the running CL module.
  2. Specifying *YES for this parameter causes the value on the AUT parameter to be ignored. The existing module is used as the source of authority. To change the authority for the module, you can use the Grant Object Authority (GRTOBJAUT) or Revoke Object Authority (RVKOBJAUT) commands.

*NO: The existing module is not replaced. When a module with the same name exists in the specified library, a message is displayed and compilation stops.

TGTRLS
Specifies the release level of the operating system on which you intend to use the CL module being created.

When specifying the target-release value, the format VxRxMx is used to specify the release, where Vx is the version, Rx is the release, and Mx is the modification level. For example, V3R6M0 is version 3, release 6, modification level 0.

Valid values depend on the current version, release, and modification level, and they change with each new release. See the Valid Values for TGTRLS Parameter table in the Backup and recovery topic in the Information Center for a complete list of valid values.

*CURRENT: The CL module is to be used on the release of the operating system currently running on your system. The CL module can also be used on a system with any subsequent release of the operating system installed.

*PRV: The CL module is to be used on the previous release with modification level 0 of the operating system. The CL module can also be used on a system with any subsequent release of the operating system installed.

target-release: Specify the release in the format VxRxMx. The CL module can be used on a system with the specified release or with any subsequent release of the operating system installed.

AUT
Specifies the authority given to users who do not have specific authority to the CL module, who are not on an authorization list, and whose user group has no specific authority to the CL module.

Note: This parameter will be ignored if REPLACE(*YES) is specified.

*LIBCRTAUT: The public authority for the CL module is taken from the value on the CRTAUT parameter of the target library (the library that is to contain the CL module). The public authority is determined when the CL module is created. If the CRTAUT value for the library changes after the CL module is created, the new value does not affect any existing objects.

*CHANGE: The user can perform all operations on the object except those limited to the owner or controlled by object existence authority and object management authority. The user can change and perform basic functions on the object. Change authority provides object operational authority and all data authority. If the object is an authorization list, the user cannot add, change, or remove users.

*ALL: The user can perform all operations except those limited to the owner or controlled by authorization list management authority. The user can control the object's existence, specify the security for the object, change the object, and perform basic functions on the object. The user also can change ownership of the CL module.

*USE: The user can perform basic operations on the object, such as running a program or reading a file. The user cannot change the object. *USE authority provides object operational authority, read authority, and execute authority.

*EXCLUDE: The user cannot access the object.

authorization-list-name: Specify the name of the authorization list used.

SRTSEQ
Specifies the sort sequence table to be used for string comparisons for this CL module. The sort sequence is used with the language identifier and the coded character set identifier of the job to determine the sort sequence table to use.

Note: SRTSEQ(*HEX) must be specified when a previous release is specified on the TGTRLS parameter.

*HEX: A sort sequence table is not used. The hexadecimal values of the characters are used to determine the sort sequence.

*JOB: The sort sequence used is the SRTSEQ associated with the job when the CL module is created.

*JOBRUN: The sort sequence used is the SRTSEQ associated with the job when the CL module is run.

*LANGIDUNQ: The sort sequence table uses a unique weight for each character, and is the unique-weight sort table for the language specified on the LANGID parameter.

*LANGIDSHR: The sort sequence table uses the same weight for multiple characters, and is the shared-weight sort sequence table associated with the language specified on the LANGID parameter.

The name of the sort sequence table can be qualified by one of the following library values:

*LIBL: All libraries in the job's library list are searched until the first match is found.

*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.

library-name: Specify the name of the library to be searched.

table-name: Specify the name of the sort sequence table to be used with this CL module.

LANGID
Specifies the language identifier to be used when SRTSEQ(*LANGIDUNQ) or SRTSEQ(*LANGIDSHR) is specified.

*JOBRUN: The language ID used is the LANGID associated with the job when the CL module is run.

*JOB: The language ID used is the LANGID associated with the job when the CL module is created.

language-ID: Specify the language identifier to be used by the job.

OPTIMIZE
Specifies the optimization level of the generated module code.

*NONE: The generated code is not optimized. This value is the fastest level of optimization in terms of translation time. This level allows variables to be displayed and changed while debugging.

*BASIC: Some optimization is performed on the code. This level allows user variables to be displayed but not changed while debugging.

*FULL: Full optimization is performed on the generated code. Translation time is the longest. During a debug session, user variables cannot be changed, but can be displayed. The presented values may not be the current value of the variable.

DBGVIEW
Specifies which level of debugging is available for the compiled module, and which source views are available for source-level debugging.

*STMT: The compiled module can be debugged using module statement numbers and symbolic identifiers.

*NONE: None of the debug options for debugging the compiled module are available.

*ALL: All of the debug options for debugging the compiled module can be used. The source and debug listing views are generated.

*SOURCE: The source view for debugging the compiled module is generated.

*LIST: The listing view for debugging the compiled module is generated.

Example for CRTCLMOD

Example 1: Compiling a Module

CRTCLMOD   PAYROLL  TEXT('Payroll Program')

This command calls the ILE CL compiler to compile a module named PAYROLL. The source program is in the default source file QCLSRC in the member PAYROLL. A compiler listing is created.

Error messages for CRTCLMOD

*ESCAPE Messages

CPF0C33
Target release &1 not valid.
CPF0C35
Target release &1 is not a supported release.
CPF0807
File containing compiler printout not opened.
CPF0808
Error in compiler-created code.
CPF0814
Licensed Program 5769-SS1 Option 9 not installed.
CPF0815
CL program &1 in &2 cannot be created for previous release.
CPF0821
Module &1 not created.
CPF0849
Space addressing violation.
CPF3202
File &1 in library &2 in use.
CPF3203
Cannot allocate object for file &1 in &2.
CPF3224
Not authorized to perform operation on file &1.