Create COBOL Program (CRTCBLPGM)

The CRTCBLPGM command compiles a COBOL source program into a program object. You can use this command interactively, in batch mode, or in a CL program.

All object names specified for the CRTCBLPGM command must be composed of alphanumeric characters, the first of which must be alphabetic. The names cannot exceed 10 characters in length.

Parameters

Keyword Description Choices Notes
PGM Program Qualified object name Optional, Positional 1
Qualifier 1: Program Name, *PGMID
Qualifier 2: Library Name, *CURLIB
SRCFILE Source file Qualified object name Optional, Positional 2
Qualifier 1: Source file Name, QLBLSRC
Qualifier 2: Library Name, *LIBL, *CURLIB
SRCMBR Source member Name, *PGM Optional, Positional 3
GENLVL Generation severity level 0-29, 29 Optional
TEXT Text 'description' Character value, *SRCMBRTXT, *BLANK Optional
OPTION Source listing options Values (up to 50 repetitions): *SOURCE, *NOSOURCE, *SRC, *NOSRC, *NOXREF, *XREF, *GEN, *NOGEN, *NOSEQUENCE, *SEQUENCE, *NOVBSUM, *VBSUM, *NONUMBER, *NUMBER, *LINENUMBER, *NOMAP, *MAP, *NOOPTIONS, *OPTIONS, *QUOTE, *APOST, *SECLVL, *NOSECLVL, *PRTCORR, *NOPRTCORR, *NOSRCDBG, *SRCDBG, *NOLSTDBG, *LSTDBG, *PRINT, *NOPRINT Optional, Positional 4
GENOPT Generation options Values (up to 50 repetitions): *NOLIST, *LIST, *NOXREF, *XREF, *NOPATCH, *PATCH, *NODUMP, *DUMP, *NOATR, *ATR, *RANGE, *NORANGE, *UNREF, *NOUNREF, *NOOPTIMIZE, *OPTIMIZE, *NODDSFILLER, *DDSFILLER, *NOSYNC, *SYNC, *NOCRTF, *CRTF, *NODUPKEYCHK, *DUPKEYCHK, *STDERR, *NOSTDERR, *NOEXTACCDSP, *EXTACCDSP, *NOINZDLT, *INZDLT, *NOBLK, *BLK, *STDINZ, *NOSTDINZ, *FS21DUPKY, *NOFS21DUPKY Optional, Positional 5
CVTOPT Conversion options Values (up to 50 repetitions): *NOVARCHAR, *VARCHAR, *NODATETIME, *DATETIME, *NOGRAPHIC, *GRAPHIC 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 identifier Character value, *JOBRUN, *JOB Optional
MSGLMT Message limit Element list Optional
Element 1: Number of messages 1-9999, *NOMAX
Element 2: Message limit severity 0-29, 29
PRTFILE Print file Qualified object name Optional
Qualifier 1: Print file Name, QSYSPRT
Qualifier 2: Library Name, *LIBL, *CURLIB
FLAGSTD FIPS flagging Values (up to 24 repetitions): *NOFIPS, *MINIMUM, *INTERMEDIATE, *HIGH, *NOSEG, *SEG1, *SEG2, *NODEB, *DEB1, *DEB2, *NOOBSOLETE, *OBSOLETE Optional
SAAFLAG SAA flagging *NOFLAG, *FLAG Optional
EXTDSPOPT Extended display options Values (up to 3 repetitions): *DFRWRT, *NODFRWRT, *UNDSPCHR, *NOUNDSPCHR, *ACCUPDALL, *ACCUPDNE Optional
FLAG Flagging severity 0-99, 0 Optional
REPLACE Replace program *NO, *YES Optional
TGTRLS Target release Simple name, *CURRENT, *PRV Optional
USRPRF User profile *USER, *OWNER Optional
AUT Authority Name, *LIBCRTAUT, *ALL, *CHANGE, *USE, *EXCLUDE Optional
DUMP Compiler debugging dump Element list Optional
Element 1: 1-65535, *
Element 2: 1-65535
ITDUMP Intermediate text dump 0-31, 0 Optional

Program (PGM)

Specifies the program name and library name for the COBOL program object you are creating. The possible values are:

*PGMID
The name for the program object is taken from the PROGRAM-ID paragraph in the COBOL source program.
program-name
Enter a name to identify the compiled COBOL program. If you specify a program name for this parameter, and run the compilation in batch mode, the first program in the batch job uses this name; any other programs use the name specified in the PROGRAM-ID paragraph in the source program.

The possible library values are:

*CURLIB
If you do not specify a library name, the current library is used. If you have not assigned a library as the current library, QGPL is used.
library-name
Enter the name of the library to contain the created program object.

Source file (SRCFILE)

Specifies the name of the source file that contains the COBOL source to be compiled. The possible values are:

QLBLSRC
The IBM-supplied source file, QLBLSRC, contains the COBOL source to be compiled.
source-file-name
Enter the name of the source file that contains the COBOL source to be compiled. This source file should have a record length of 92.

The possible library values are:

*LIBL
If you do not specify a library name, the system searches the library list to find the library where the source file is located.
*CURLIB
The current library is used. If you have not assigned a library as the current library, QGPL is used.
library-name
Enter the name of the library where the source file is located.

Source member (SRCMBR)

Specifies the name of the member that contains the COBOL source to be compiled. You can specify this parameter only if the source file referred to in the SRCFILE parameter is a database file. The possible values are:

*PGM
If you specified a program name for the PGM parameter, the compiler looks for the source program in a member having the same name as the program, and creates an object program with the same name as the program and member.

If you did not specify a program name for the PGM parameter, the compiler looks for the program source in the first member of the database source file, and creates an object program using the name specified in the PROGRAM-ID paragraph.

source-file-member-name
Enter the name of the member that contains the COBOL source.

Generation severity level (GENLVL)

Specifies the severity level that determines if a program object is created. The severity level corresponds to the severity level of the messages produced during compilation of the program. If the severity level of error messages is greater than the value you specify, a program object is not created. For example, if you specify 19 for this parameter, a program object is not created if the severity level of any of the messages is 20 or greater.

The possible values are:

29
If errors occur with a severity level greater than 29, no program object is created.
severity-level
Specify a one or two-digit number, 0 through 29. If errors occur with a severity level greater than this level, no program object is created.

Text 'description' (TEXT)

A brief description of the program and its function. The possible values are:

*SRCMBRTXT
Use the same text for the program object as that which describes the database file member containing the COBOL source. If the source comes from a device or in-line file, specifying *SRCMBRTXT has the same effect as specifying *BLANK.
*BLANK
No text is specified.
text-description
Enter the text that briefly describes the program and its function. The text can be a maximum of 50 characters in length and must be enclosed in apostrophes. The apostrophes are not part of the 50-character string.

Source listing options (OPTION)

Specifies the options to use when the COBOL source is compiled. The possible values are:

*SOURCE or *SRC
The compiler produces a source listing, consisting of the COBOL source code and all compilation-time error messages.
*NOSOURCE or *NOSRC
The compiler does not produce the source part of the listing. If you do not require a source listing, you should use this option because compilation may take less time.
*NOXREF
The compiler does not produce a cross-reference listing for the source program.
*XREF
The compiler produces a cross-reference listing for the source program.
*GEN
The compiler creates a program object after the source program is compiled.
*NOGEN
The compiler does not create a program object after the source program is compiled. You might specify this option if you want only error listings at this time.
*NOSEQUENCE
The reference numbers are not checked for sequence errors.
*SEQUENCE
The reference numbers are checked for sequence errors. Sequence errors do not occur if the *LINENUMBER option is specified.
*NOVBSUM
Verb-usage counts are not printed.
*VBSUM
Verb-usage counts are printed.
*NONUMBER
The source-file sequence numbers are used for reference numbers.
*NUMBER
The user-supplied sequence numbers (columns 1 through 6) are used for reference numbers.
*LINENUMBER
The sequence numbers created by the compiler are used for reference numbers. This option combines program source code and source code introduced by COPY statements into one consecutively numbered sequence. Use this option if you specify FIPS (Federal Information Processing Standards) flagging or SAA* flagging.
*NOMAP
The compiler does not list the Data Division map.
*MAP
The compiler lists the Data Division map.
*NOOPTIONS
Options in effect are not listed for this compilation.
*OPTIONS
Options in effect are listed for this compilation.
*QUOTE
Specifies that the delimiter quotation mark (") is used for nonnumeric literals and Boolean literals. This also specifies that the value of the figurative constant QUOTE has the EBCDIC value of a quotation mark.
*APOST
Specifies that the delimiter apostrophe (') is used for nonnumeric literals and Boolean literals. This also specifies that the value of the figurative constant QUOTE has the EBCDIC value of an apostrophe.
*NOSECLVL
Second level message text is not listed for this compilation.
*SECLVL
Second level message text is listed for this compilation.
*PRTCORR
The compiler inserts comment lines in the compiler listing indicating which elementary items were included as a result of the use of the CORRESPONDING phrase.
*NOPRTCORR
The compiler does not insert comment lines in the compiler listing when the CORRESPONDING phrase is used.
*NOSRCDBG
This option determines the kind of information you see on your programmable work station when using client tooling to compile your COBOL programs.

The compiler does not produce source-level debugging information. If *NOLSTDBG is also in effect, the compiler does not produce source-level error information either.

*SRCDBG
This option determines the kind of information you see on your programmable work station when using client tooling to compile your COBOL programs.

The compiler produces source-level error information and source-level debugging information.

You cannot specify *SRCDBG and *LSTDBG together. Specify one or the other.

*NOLSTDBG
This option determines the kind of information you see on your programmable work station when using client tooling to compile your COBOL programs.

The compiler does not produce a listing view, or listing-level debugging information. If *NOSRCDBG is also in effect, the compiler does not produce source-level error information either.

*LSTDBG
This option determines the kind of information you see on your programmable work station when using client tooling to compile your COBOL programs.

The compiler produces a listing view, source-level error information, and listing-level debugging information.

You cannot specify *SRCDBG and *LSTDBG together. Specify one or the other.

*PRINT
The compiler produces a spool listing.
*NOPRINT
The compiler does not produce a spool listing.

Generation options (GENOPT)

Specifies the options to use when the program object is created. The listings could be required if a problem occurs in COBOL. The possible values are:

*NOLIST
No IRP (intermediate representation of program), associated hexadecimal code, or error messages are listed.
*LIST
The IRP, its associated hexadecimal code, and any error messages are listed.
*NOXREF
Does not produce a cross-reference listing of the objects defined in the IRP.
*XREF
Produces a cross-reference listing of all objects defined in the IRP.
*NOPATCH
Does not reserve space in the compiled program for a program patch area.
*PATCH
Reserves space in the compiled program for a program patch area. The program patch area can be used for debugging purposes.
*NODUMP
Does not list the program template.
*DUMP
Lists the program template.
*NOATR
Does not list the attributes for the IRP source.
*ATR
Lists the attributes for the IRP source.
*RANGE
At run-time, the system verifies that subscripts are within the correct ranges, but does not verify index ranges. It also checks for reference modification and compiler-generated substring operations.
*NORANGE
Does not verify ranges at run-time.
*UNREF
Includes unreferenced data items in the compiled program.
*NOUNREF
Does not include unreferenced data items in the compiled program. This reduces the number of ODT (object definition table) entries used, allowing a larger program to be compiled. The unreferenced data items still appear in the cross-reference listings produced through the *XREF option.
*NOOPTIMIZE
The compiler performs only standard optimizations for the program.
*OPTIMIZE
The program object created may run more efficiently, and may require less storage. However, specifying *OPTIMIZE can substantially increase the time required to compile a program.
*NODDSFILLER
If no matching fields are found by a COPY DDS statement, no field descriptions are created.
*DDSFILLER
When no matching fields are found by a COPY DDS statement, a single character FILLER field description, "07 FILLER PIC X", is always created.
*NOSYNC
The SYNCHRONIZED clause is syntax checked.
*SYNC
The SYNCHRONIZED clause causes the alignment of an elementary item on a natural boundary in storage.
*NOCRTF
Files that are unavailable at the time of an OPEN operation are not created dynamically.
*CRTF
Files that are unavailable at the time of an OPEN operation are created dynamically.
*NODUPKEYCHK
Does not check for duplicate keys for INDEXED files.
*DUPKEYCHK
Checks for duplicate keys for INDEXED files.
*STDERR
Standard error handling is used. See the chapter on error handling in the COBOL/400 User's Guide for more information about error handling.
*NOSTDERR
The error handling method of Version 1, Releases 1 and 2, is used. See the chapter on error handling in the COBOL/400 User's Guide for more information about error handling.
*NOEXTACCDSP
The compiler does not allow extended ACCEPT or extended DISPLAY statements.
*EXTACCDSP
The compiler allows extended ACCEPT and extended DISPLAY statements.
*NOINZDLT
Relative files with sequential access are not initialized with deleted records during the CLOSE operation if the files were opened for OUTPUT. That is, the record boundary is determined by the number of records written at OPEN OUTPUT time. Subsequent OPEN operations allow access only up to the record boundary.
*INZDLT
Relative files with sequential access are initialized with deleted records during the CLOSE operation if the files were opened for OUTPUT. Active records in the files are not affected. That is, the record boundary is defined as the file size for subsequent OPEN operations.
*NOBLK
The compiler allows blocking only of SEQUENTIAL access files with no START statement.

If a BLOCK CONTAINS clause is specified, the BLOCK CONTAINS clause is ignored, except for tape files.

*BLK
When used with BLOCK CONTAINS, the compiler allows blocking from DYNAMIC access files and SEQUENTIAL access files with a START statement. Blocking is not allowed for RELATIVE files opened for output operations.

The BLOCK CONTAINS clause controls the number of records to be blocked.

When no BLOCK CONTAINS clause is specified, the compiler allows blocking only of SEQUENTIAL access files with no START statement. The operating system determines the number of records to be blocked.

*STDINZ
The compiler initializes data items to system defaults, provided that the items are not subject to a VALUE clause.
*NOSTDINZ
For those items with no VALUE clause, the compiler does not initialize data items to system defaults.
*FS21DUPKY
The compiler reports a file status of 21 when processing an indexed file with duplicate keys in random or dynamic access mode, if the value of the key is changed between the mandatory READ statement and a following REWRITE or DELETE statement.
*NOFS21DUPKY
The compiler does not report a file status of 21 when processing an indexed file with duplicate keys in random or dynamic access mode. A REWRITE statement can change the key of a record.

Conversion options (CVTOPT)

Specifies how the compiler handles SAA date, time, and timestamp data types, DBCS-graphic data types, and variable-length character fields passed from externally-described files to your program through COPY DDS. The possible values are:

*NOVARCHAR
Variable-length fields are ignored, and are declared as FILLER fields.
*VARCHAR
Variable-length fields are declared as fixed-length group items, and are accessible to the program.
*NODATETIME
Date, time, and timestamp data types are ignored, and are declared as FILLER fields.
*DATETIME
Date, time, and timestamp data types are declared as fixed-length character fields, and are accessible to the program.
*NOGRAPHIC
Graphic data types are ignored, and are declared as FILLER fields.
*GRAPHIC
Fixed-length graphic data types are declared as fixed-length alphanumeric fields, and are accessible to the program.

When the *VARCHAR option is also in use, variable-length DBCS-graphic data types are declared as fixed-length group items, and are accessible to the program.

Sort sequence (SRTSEQ)

Specifies the sort sequence used when NLSSORT is associated with an alphabet-name in the ALPHABET clause. The SRTSEQ parameter is used in conjunction with the LANGID parameter to determine which system-defined or user-defined sort sequence table the program will use. The possible values are:

*HEX
No sort sequence table will be used, and the hexadecimal values of the characters will be used to determine the sort sequence.
*JOB
The sort sequence of the program will be resolved and associated with the program at compile time. The sort sequence table must exist in the system at compile time.
*JOBRUN
The sort sequence of the program will be resolved and associated with the program at run time. At compile time, the compiler will associate the sort sequence of the compile job with the program. At run time, this sort sequence will be replaced by the sort sequence associated with the job at run time.
*LANGIDUNQ
Specifies that the sort sequence table being used must contain a unique weight for each character in the code page. The sort sequence table used will be the unique weighted table associated with the language specified in the LANGID parameter.
*LANGIDSHR
Specifies that the sort sequence table being used can contain the same weight for multiple characters in the code page. The sort sequence table used will be the shared weighted table associated with the language specified in the LANGID parameter.
table-name
Enter the name of the sort sequence table to be used. The table contains weights for all characters in a given code page. A weight is associated with the character that is defined at the code point. When using a sort sequence table name, the library in which the table resides can be specified. The valid values are:
*LIBL
The library list is searched to find the library where the sort sequence table is located.
*CURLIB
The current library is searched. If you have not assigned a library as the current library, QGPL is used.
library-name
Enter the name of the library where the sort sequence table is found.

Note: The valid PROCESS statement options for SRTSEQ are SRTSEQ(HEX), SRTSEQ(JOB), SRTSEQ(JOBRUN), SRTSEQ(LANGIDUNQ), SRTSEQ(LANGIDSHR), SRTSEQ("table-name"), SRTSEQ("library-name/table-name"), SRTSEQ("LIBL/table-name"), and SRTSEQ("CURLIB/table-name").

Language identifier (LANGID)

Specifies the language identifier which is used in conjunction with the sort sequence. The LANGID parameter is used only when the SRTSEQ value in effect is *LANGIDUNQ or *LANGIDSHR. The possible values are:

*JOBRUN
The language identifier of the program will be resolved at run time. When the compiled program is run, the language identifier of the job is used. This value allows a program to be compiled once and used with different language identifiers at run time.
*JOB
The language identifier of the program will be resolved at compile time.
language-identifier
Enter a valid 3 character language identifier.

Note: The valid PROCESS statement options for LANGID are LANGID(JOBRUN), LANGID(JOB), and LANGID("language-identifier").

Message limit (MSGLMT)

Controls compilation by indicating the maximum number of error messages of a given error severity level that can occur before compilation stops.

For example, you can stop compilation if more than three errors with a severity level of 20 or higher occur. In this example, you would specify 3 for the maximum number of error messages, and 20 for the maximum error severity level. If three errors of severity level 20 or higher occur, compilation continues, but when a fourth is encountered, compilation stops. If no messages equal or exceed the maximum severity level, compilation continues regardless of the number of errors encountered.

message-limit
The possible values for the maximum number of error messages are:
*NOMAX
Compilation continues until normal completion regardless of the number of errors encountered.
1-9999
Compilation stops if the number of errors of the specified severity level or higher exceeds the number you specify. If no messages equal or exceed the maximum severity level, compilation continues regardless of the number of errors encountered.
message-severity
The possible values for the maximum error severity level are:
29
Compilation stops if the number of errors with severity level 29 or higher exceeds the maximum number of error messages specified.
maximum-severity-level
Specify a one or two-digit number, 0 through 29. Compilation stops if the number of errors with the specified severity level or higher exceeds the maximum number of error messages you specify.

Print file (PRTFILE)

Specifies the name of the file to which the compiler listing is directed and the library where the file is located. The file should have a minimum record length of 132. If a file with a record length less than 132 is specified, information is lost.

The possible values are:

QSYSPRT
If you do not specify a file name, the compiler listing is directed to QSYSPRT, an IBM-supplied file.
file-name
Enter the name of the file to which the compiler listing is directed.

The possible library values are:

*LIBL
The system searches the library list to find the library where the file is located.
*CURLIB
The current library is used. If you have not assigned a library as the current library, QGPL is used.
library-name
Enter the name of the library in which the file is located.

FIPS flagging (FLAGSTD)

Specifies the options for FIPS flagging. The possible values are:

*NOFIPS
The source program is not FIPS flagged.
*MINIMUM
FIPS flag for minimum subset and higher.
*INTERMEDIATE
FIPS flag for intermediate subset and higher.
*HIGH
FIPS flag for high subset.
*NOSEG
Optional module SEGMENTATION is not FIPS flagged.
*SEG1
FIPS Flag for optional module SEGMENTATION level 1 and higher.
*SEG2
FIPS Flag for optional module SEGMENTATION level 2.
*NODEB
Optional module DEBUG is not FIPS flagged.
*DEB1
FIPS Flag for optional module DEBUG level 1 and higher.
*DEB2
FIPS Flag for optional module DEBUG level 2.
*NOOBSOLETE
Obsolete language elements are not flagged.
*OBSOLETE
Obsolete language elements are flagged.

SAA flagging (SAAFLAG)

Specifies if you want flagging of COBOL/400* functions that are not supported by SAA COBOL. The possible values are:

*NOFLAG
SAA COBOL flagging is not performed.
*FLAG
SAA COBOL flagging is performed.

Extended display options (EXTDSPOPT)

Specifies the options to use for extended ACCEPT and extended DISPLAY statements for workstation I/O. The possible values are:

*DFRWRT
Extended DISPLAY statements are held in a buffer until an extended ACCEPT statement is encountered, or until the buffer is filled.

If an extended ACCEPT statement is not encountered before the buffer is filled, the contents of the buffer are written to the display. When an extended ACCEPT statement is encountered, the current contents of the buffer are written to the display.

*NODFRWRT
Each extended DISPLAY statement is performed as it is encountered.
*UNDSPCHR
Displayable and undisplayable characters are handled by extended ACCEPT and extended DISPLAY statements.
*NOUNDSPCHR
Only displayable characters are handled by extended ACCEPT and extended DISPLAY statements.

Although you must use this option for display stations attached to remote 3174 and 3274 controllers, you can also use it for local work stations. If you do use this option, your data must contain displayable characters. If the data contains values less than hexadecimal 20, the results are unpredictable, and can range from unexpected display formats to severe errors.

*ACCUPDALL
All types of data are predisplayed in the extended ACCEPT statements regardless of the existence of the UPDATE phrase.
*ACCUPDNE
Only numeric edited data are predisplayed in the extended ACCEPT statements that do not contain the UPDATE phrase.

Flagging severity (FLAG)

Specifies the minimum severity level of messages to be printed. The possible values are:

0
All messages are printed.
severity-level
Enter a one or two-digit number that specifies the minimum severity level of messages that are printed. Messages that have severity levels of the specified value or higher are listed.

Replace program (REPLACE)

Specifies if a new program object is created when a program object of the same name in the same library already exists. The possible values are:

*YES
A new program object is created and any existing program object of the same name in the specified library is moved to library QRPLOBJ.
*NO
A new program object is not created if a program object of the same name already exists in the specified library.

Target release (TGTRLS)

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

You can specify an exact release level in the format VxRxMx, where Vx is the version, Rx is the release, and Mx is the modification level. For example, V3R1M0 is Version 3, Release 1, Modification level 0.

Note: To use the object on the target system, you must save the object to the target release level specified on the create command and then restore it on the target system.

For example, if your system is running V3R1M0 and you want to create a program object for distribution to a V2R3M0 system, you must create the program with TGTRLS(V2R3M0) or TGTRLS(*PRV), save the program with TGTRLS(V2R3M0) or TGTRLS(*PRV), and restore the program on the V2R3M0 system. The program object can also be restored on a V3R1M0 system.

Note: The program may be able to be restored on a release level earlier than the one you specified on the create command. Use DSPPGM to determine the earliest release the program can run.

*CURRENT
The object is to be used on the release of the operating system currently running on your system. For example, if V3R1M0 is running on the system, *CURRENT means you intend to use the object on a system with V3R1M0 installed. You can also use the object 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. For example, if V3R1M0 is running on your system, *PRV means you intend to use the object on a system with V2R3M0 installed. You can also use the object on a system with any subsequent release of the operating system installed.
release-level
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.

Valid values depend on the current version, release, and modification level, and they change with each new release. To see the list of valid values, press F4=Prompt on the TGTRLS parameter of the command.

User profile (USRPRF)

Specifies the user profile that will run the compiled COBOL program. The profile of the program owner or the program user is used to run the program and control which objects can be used by the program (including the authority the program has for each object).

The possible values are:

*USER
The user profile of the program user is to be used when the program is run.
*OWNER
The user profiles of both the program's owner and user are to be used when the program is run. The collective sets of object authority in both user profiles are to be used to find and access objects during the running of the program. Any objects that are created during the program are owned by the program's user.

Authority (AUT)

Specifies the authority given to users who do not have specific authority to the program object, who are not on the authorization list, or whose group has no specific authority to the program object. You can alter the authority for all users, or for specific users after the program object is created by using the GRTOBJAUT (Grant Object Authority) or RVKOBJAUT (Revoke Object Authority) commands.

The possible values are:

*LIBCRTAUT
The public authority for the object is taken from the CRTAUT keyword of the target library (the library that is to contain the created program object). This value is determined when the program object is created. If the CRTAUT value for the library changes after the program object is created, the new value does NOT affect any existing objects.
*ALL
Provides authority for all operations on the program object except those limited to the owner or controlled by authorization list management authority. The user can control the program object's existence, specify security for it, change it, and perform basic functions on it, but cannot transfer its ownership.
*CHANGE
Provides all data authority and the authority for performing all operations on the program object except those limited to the owner or controlled by object authority and object management authority. The user can change the object and perform basic functions on it, such as running and debugging the program object.
*USE
Provides object operational authority and read authority; authority for basic operations on the program object such as running the program. The user is prevented from changing the object.

Note: A user must have *USE authority to a program to obtain a formatted dump of the variables of the program. To dump variables, the program must also have observable information.

If you do not want some users to be able to dump the variables, then give them only *OBJOPR plus *EXECUTE authority to the program. This will allow them to call the program but not dump its variables.

If you do not want any users to be able to dump the variables, then use Change Program (CHGPGM) to remove the program's observable information.

*EXCLUDE
The user cannot access the program object.
authorization-list-name
Enter the name of an authorization list of users and authorities to which the program is added. The program object is secured by this authorization list, and the public authority for the program object is set to *AUTL. The authorization list must exist on the system when the CRTCBLPGM command is issued.

Compiler debugging dump (DUMP)

An IBM COBOL debugging aid. (For IBM service personnel.)

Intermediate text dump (ITDUMP)

An IBM debugging aid which causes the compiler to dump the internal text at certain times during the compilation. (For IBM service personnel.)

Examples

Example 1: Compiling a Source Program into a Program Object

CRTCBLPGM   PGM(MYLIB/XMPLE1)  SRCFILE(MYLIB/QLBLSRC)
            SRCMBR(XMPLE1)  OPTION(*SOURCE)
            TEXT('My COBOL program')

This command calls the COBOL compiler to create a program named XMPLE1. The source program is in member XMPLE1 of source file QLBLSRC in library MYLIB. A compiler listing is created.

Error messages

*ESCAPE Messages

LBL9001
Compile failed. Program not created.
LBL9004
Program already exists. Compile failed.
LBL9006
TGTRLS(&1) specified, but previous compiler is not installed.
LBL9007
The product library is damaged, or the user is not allowed to use it.
SQL9002
Conflict in TGTRLS parameters for SQL precompile and &7 compile.
SQL9003
&7 Compile at wrong level for SQL source.