Create Bound CL Program (CRTBNDCL)

The Create Bound Control Language Program (CRTBNDCL) command creates an Integrated Language Environment (ILE) control language (CL) program from the specified CL source program.

Most of the parameters and options for the CRTBNDCL command are the same as the parameters and options for the Create Control Language Module (CRTCLMOD) command, with the exception of the User profile (USRPRF) parameter, which only exists on the CRTBNDCL command. Option *NOGEN is not available on the CRTBNDCL command. The full compilation is always run.

Parameters

Keyword Description Choices Notes
PGM Program Qualified object name Required, Positional 1
Qualifier 1: Program Name
Qualifier 2: Library Name, *CURLIB
SRCFILE Source file Qualified object name Optional, Positional 2
Qualifier 1: Source file Name, QCLSRC
Qualifier 2: Library Name, *LIBL, *CURLIB
SRCMBR Source member Name, *PGM Optional, Positional 3
TEXT Text 'description' Character value, *SRCMBRTXT, *BLANK Optional
DFTACTGRP Default activation group *YES, *NO Optional
ACTGRP Activation group Name, *STGMDL, *NEW, *CALLER Optional
STGMDL Storage model *SNGLVL, *TERASPACE Optional
OUTPUT Output *PRINT, *NONE Optional, Positional 4
OPTION Source listing options Values (up to 3 repetitions): *XREF, *NOXREF, *SECLVL, *NOSECLVL, *EVENTF, *NOEVENTF, *DOSLTLVL, *NODOSLTLVL Optional, Positional 5
USRPRF User profile *USER, *OWNER Optional
LOG Log commands *JOB, *YES, *NO Optional
ALWRTVSRC Allow RTVCLSRC *YES, *NO Optional
REPLACE Replace program *YES, *NO Optional
TGTRLS Target release Simple name, *CURRENT, *PRV Optional
AUT Authority Name, *LIBCRTAUT, *CHANGE, *ALL, *USE, *EXCLUDE Optional
SRTSEQ Sort sequence Single values: *HEX, *JOB, *JOBRUN, *LANGIDUNQ, *LANGIDSHR
Other values: Qualified object name
Optional
Qualifier 1: Sort sequence Name
Qualifier 2: Library Name, *LIBL, *CURLIB
LANGID Language ID Character value, *JOBRUN, *JOB Optional
OPTIMIZE Optimization *NONE, *BASIC, *FULL, 10, 20, 30, 40 Optional
DBGVIEW Debugging view *STMT, *SOURCE, *LIST, *ALL, *NONE Optional
DBGENCKEY Debug encryption key Character value, *NONE Optional
ENBPFRCOL Enable performance collection *PEP, *FULL, *NONE Optional
INCFILE INCLUDE file Single values: *SRCFILE
Other values: Qualified object name
Optional
Qualifier 1: INCLUDE file Name
Qualifier 2: Library Name, *LIBL, *CURLIB

Program (PGM)

Specifies the program to be created.

This is a required parameter.

Qualifier 1: Program

name
Specify the name of the program to be created.

Qualifier 2: Library

*CURLIB
The program is stored in the current library for the job. If no current library entry exists in the library list, QGPL is used.
name
Specify the library where the program is to be stored.

Source file (SRCFILE)

Specifies the source file that contains the CL source member to be compiled.

Qualifier 1: Source file

QCLSRC
The source file named QCLSRC, that contains the CL source member to be compiled, is used.
name
Specify the name of the source file that contains the CL source member to be compiled. The source file can be a database file, a device file, or an inline data file.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the thread is used to locate the source file. If no library is specified as the current library for the thread, the QGPL library is used.
name
Specify the name of the library to be searched.

Source member (SRCMBR)

Specifies the name of the member of the source file that contains the CL source program to be compiled.

*PGM
The CL source program to be compiled is in the member of the source file that has the same name as that specified on the Program (PGM) parameter for the compiled program.
name
Specify the name of the member that contains the CL source program, if the member name is not the same as the name of the program to be created.

Text 'description' (TEXT)

Specifies text that briefly describes the compiled CL program.

*SRCMBRTXT
The text is taken from the source file member used to create the CL program. 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.

Default activation group (DFTACTGRP)

Specifies whether the program is associated with the default activation group.

*YES
The program is associated with the default activation group.

Note: If this value is specified, the ACTGRP parameter cannot be specified.

Note: If DFTACTGRP(*YES) is specified (or defaulted) on the CRTBNDCL command, the resulting program can only contain a single *MODULE object. If the CL source being compiled contains a DCLPRCOPT (Declare Processing Options) command that specifies a binding directory for the BNDDIR parameter, and if any modules in a specified binding directory export a procedure that is referenced by a CALLPRC command in the CL source being compiled, DFTACTGRP(*NO) must be specified either on the CRTBNDCL command or the DCLPRCOPT command.

*NO
The program is not associated with the default activation group.

Activation group (ACTGRP)

Specifies the activation group that the program is associated with when it is called. The activation group provides:

*STGMDL
IF STGMDL(*SNGLVL) is specified, this program will be activated into the QILE activation group when it is called. If STGMDL(*TERASPACE) is specified, the program will be activated into the QILETS activation group when it is called.
*CALLER
When this program gets called, the program is activated into the caller's activation group.
*NEW
When this program gets called, the system creates a new activation group.
name
Specify the name of the activation group to be used when this program is called.

Storage model (STGMDL)

Specifies the storage model attribute of the program.

*SNGLVL
The program is created with single-level storage model. When a single-level storage model program is activated and run, it is supplied single-level storage for automatic and static storage. A single-level storage program runs only in a single-level storage activation group.
*TERASPACE
The program is created with teraspace storage model. When a teraspace storage model program is activated and run, it is supplied teraspace storage for automatic and static storage. A teraspace storage program runs only in a teraspace storage activation group. STGMDL(*TERASPACE) cannot be specified if DFTACTGRP(*YES) is specified.

Output (OUTPUT)

Specifies whether or not a compiler listing is produced.

*PRINT
The compiler listing is produced. The information contained in the listing will be dependent on the values specified for the Source listing options (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.

Source listing options (OPTION)

Specifies the types of output lists created when this command is processed and whether a program is created. Up to three 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 will be 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.

Cross Reference Option

*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 Option

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

Event File Creation Option

*NOEVENTF
The compiler will not produce an event file for use by the CoOperative Development Environment (CODE) product.
*EVENTF
The compiler produces an event file for use by the CODE product. The event file is created as a member in the file EVFEVENT in your source library. The CODE product uses this file to offer error feedback integrated with the CODE editor. This option is normally specified by the CODE product on your behalf.

DO/SELECT Nesting Level Option

*NODOSLTLVL
The compiler does not add the new columns DO SLT into the spooled file printed. DO and SELECT nesting level are not indicated.
*DOSLTLVL
The compiler adds the new columns DO SLT into the spooled file in order to indicate the DO and SELECT nesting level. The column DO indicates the Do level starting for every Do Group, Do For, Do Until and Do While and finishing at the corresponding End Do Group. The column SLT indicates the SELECT level starting for every Select and finishing at the corresponding End Select.

User profile (USRPRF)

Specifies whether the authority checking done while this program is running includes only the user who is running the program (*USER) or both the user running the program and the program owner (*OWNER). The profiles of the program user or both the program user and the program owner are used to control which objects can be used by the program, including the authority the program has for each object.

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

*USER
The program runs under the user profile of the program's user.
*OWNER
The user profiles of both the program's owner and the program's user are used when the program is processed. The collective sets of object authority in both user profiles are used to find and access objects during program processing. Authority from the owning user profile's group profile is not included in the authority for the running program.

Log commands (LOG)

Specifies the logging options for a created CL program.

*JOB
Logging of commands in a running CL program 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.

Allow RTVCLSRC (ALWRTVSRC)

Specifies whether the CL source is saved with the module object. Source that is saved can be retrieved later by using the Retrieve CL Source (RTVCLSRC) command.

Note: This parameter is ignored if a release earlier than V7R1M0 is specified for the Target release (TGTRLS) parameter.

*YES
CL source is saved with the module.
*NO
CL source is not saved with the module.

Replace program (REPLACE)

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

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

Notes:

  1. If a running CL program is recompiled with *YES specified for the REPLACE parameter, message queue errors may occur in the running CL program.
  2. Specifying *YES on this parameter causes the values on the USRPRF and AUT parameters to be ignored. The existing program is used as the source of authority, and the user profile attribute is copied from the existing program to the new program. To change the profile you can use the Change Program (CHGPGM) command. To change the authority for the program you can use the Grant Object Authority (GRTOBJAUT) or Revoke Object Authority (RVKOBJAUT) command.
*NO
The existing program is not replaced. When a program with the same name exists in the specified library, a message is displayed and compilation stops.

Target release (TGTRLS)

Specifies the release of the operating system on which you intend to use the object 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, V5R3M0 is version 5, release 3, modification 0.

Valid values depend on the current version, release, and modification level of the operating system, and they change with each new release. You can press F4 while prompting this command parameter to see a list of valid target release values.

*CURRENT
The object is to be used on the release of the operating system currently running on your system. The object can also be used on a system with any subsequent release of the operating system installed.
*PRV
The object is to be used on the previous release with modification level 0 of the operating system. The object can also be used on a system with any subsequent release of the operating system installed.
character-value
Specify the release in the format VxRxMx. The object can be used on a system with the specified release or with any subsequent release of the operating system installed.

Authority (AUT)

Specifies the authority you are granting to the users who do not have specific authority for the object, who are not on the authorization list, and whose user group has no specific authority for the object.

*LIBCRTAUT
The system determines the authority for the object by using the value specified for the Create authority (CRTAUT) parameter on the Create Library (CRTLIB) command for the library containing the object to be created. If the value specified for the CRTAUT parameter is changed, the new value will 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 (*OBJEXIST) and object management (*OBJMGT) authorities. The user can change and perform basic functions on the object. *CHANGE authority provides object operational (*OBJOPR) 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 (*AUTLMGT) 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 object.
*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 (*USE) authority provides object operational (*OBJOPR), read (*READ), and execute (*EXECUTE) authorities.
*EXCLUDE
The user cannot access the object.
name
Specify the name of an authorization list to be used for authority to the object. Users included in the authorization list are granted authority to the object as specified in the list. The authorization list must exist when the object is created.

Note: This parameter is ignored when REPLACE(*YES) is specified.

Sort sequence (SRTSEQ)

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

Single values

*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 program is created.
*JOBRUN
The sort sequence used is the SRTSEQ associated with the job when the CL program 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 for 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 for the LANGID parameter.

Qualifier 1: Sort sequence

name
Specify the name of the sort sequence table to be used with this CL program.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the thread is searched. If no library is specified as the current library for the thread, the QGPL library is searched.
name
Specify the name of the library to be searched.

Language ID (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 program is run.
*JOB
The language ID used is the LANGID associated with the job when the CL program is created.
language-ID
Specify the language identifier to be used by the job.

Optimization (OPTIMIZE)

Specifies the optimization level of the generated program code. ILE CL can not be optimized. For compatibility, values other than *NONE are accepted, but no optimization will be performed. ILE CL modules and programs should not be used with system functions that require an optimization level higher than *NONE.

*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 modified while debugging.
*BASIC
No optimization is performed. CPD0861 will be displayed in the compiled listing and sent to the job log.
*FULL
No optimization is performed. CPD0861 will be displayed in the compiled listing and sent to the job log.
10
No optimization is performed. CPD0861 will be displayed in the compiled listing and sent to the job log.
20
No optimization is performed. CPD0861 will be displayed in the compiled listing and sent to the job log.
30
No optimization is performed. CPD0861 will be displayed in the compiled listing and sent to the job log.
40
No optimization is performed. CPD0861 will be displayed in the compiled listing and sent to the job log.

Debugging view (DBGVIEW)

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

*STMT
The compiled program can be debugged using program statement numbers and symbolic identifiers.
*ALL
All of the debug options for debugging the compiled program can be used. The source and debug listing views are generated.
*SOURCE
The source view for debugging the compiled program is generated.
*LIST
The listing view for debugging the compiled program is generated.
*NONE
None of the debug options for debugging the compiled program are available.

Debug encryption key (DBGENCKEY)

Specifies the encryption key to be used to encrypt program source that is embedded in debug views.

*NONE
No encryption key is specified.
character-value
Specify the key to be used to encrypt program source that is embedded in debug views stored in the module object. The length of the key can be between 1 and 16 bytes. A key of length 1 to 15 bytes will be padded to 16 bytes with blanks for the encryption. Specifying a key of length zero is the same as specifying *NONE.

If the key contains any characters which are not invariant over all code pages, it will be up to the user to ensure that the target system uses the same code page as the source system, otherwise the key may not match and the decryption may fail. If the encryption key must be entered on systems with differing code pages, it is recommended that the key be made of characters which are invariant for all EBCDIC code pages.

Enable performance collection (ENBPFRCOL)

This parameter is obsolete.

INCLUDE file (INCFILE)

Specifies the source file that contains members to be included in the program using Include CL Source (INCLUDE) commands.

Single Values

*SRCFILE
The source file specified for the Source file (SRCFILE) parameter contains the source file members specified on any CL INCLUDE commands.

Qualifier 1: INCLUDE file

name
Specify the name of the source file that contains the source file member specified on any CL INCLUDE commands.

The record length of the source file you specify here must be greater than or equal to the record length of the source file specified for the SRCFILE parameter.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the thread is used to locate the source file. If no library is specified as the current library for the thread, the QGPL library is used.
name
Specify the name of the library to be searched.

Examples

Example 1: Creating a Program to be Run by Any System User

CRTBNDCL   PAYROLL  TEXT('Payroll Program')

This command calls the ILE CL compiler to create a program named PAYROLL. The CL program or ILE CL procedure source is in the default source file QCLSRC in the member PAYROLL. A compiler listing is created. The program is processed under the program user's user profile and can be run by any system user.

Example 2: Creating a Program to be Run by an Authorized User

CRTBNDCL   PGM(PARTS)  SRCFILE(MYLIB/PARTDATA)  AUT(*EXCLUDE)
           OUTPUT(*PRINT)
           TEXT('This program displays all parts data')

This command creates a CL program named PARTS and stores it in the current library. The source for the program is in the PARTS member of the source file PARTDATA in the library MYLIB. A compiler listing is created. This program can be processed under the profile of the user that is running the program, who could be the owner or another user to which the owner has granted specific authorization by name in the Grant Object Authority (GRTOBJAUT) command.

Error messages

*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 5770-SS1 Option 9 not installed.
CPF0815
CL program &1 in &2 cannot be created for previous release.
CPF0820
Program &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.