Create Bound RPG Program (CRTBNDRPG)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Create Bound RPG Program (CRTBNDRPG) command compiles and binds the RPG source code to create an ILE program object (*PGM). You can use this command interactively or in batch mode.

Top

Parameters

Keyword Description Choices Notes
PGM Program Qualified object name Optional, Positional 1
Qualifier 1: Program Name, *CTLSPEC
Qualifier 2: Library Name, *CURLIB
SRCFILE Source file Qualified object name Optional, Positional 2
Qualifier 1: Source file Name, QRPGLESRC
Qualifier 2: Library Name, *LIBL, *CURLIB
SRCMBR Source member Name, *PGM Optional, Positional 3
SRCSTMF Source stream file Path name Optional
GENLVL Generation severity level 0-20, 10 Optional
TEXT Text 'description' Character value, *SRCMBRTXT, *BLANK Optional
DFTACTGRP Default activation group *YES, *NO Optional
ACTGRP Activation group Name, QILE, *NEW, *CALLER Optional
BNDDIR Binding directory Single values: *NONE
Other values (up to 50 repetitions): Qualified object name
Optional
Qualifier 1: Binding directory Name
Qualifier 2: Library Name, *LIBL, *CURLIB, *USRLIBL
OPTION Compiler options Values (up to 20 repetitions): *XREF, *NOXREF, *GEN, *NOGEN, *SECLVL, *NOSECLVL, *SHOWCPY, *NOSHOWCPY, *EXPDDS, *NOEXPDDS, *EXT, *NOEXT, *NOSHOWSKP, *SHOWSKP, *NOSRCSTMT, *SRCSTMT, *DEBUGIO, *NODEBUGIO, *NOEVENTF, *EVENTF Optional
DBGVIEW Debugging views *STMT, *SOURCE, *LIST, *COPY, *ALL, *NONE Optional
OUTPUT Output *PRINT, *NONE Optional
OPTIMIZE Optimization level *NONE, *BASIC, *FULL Optional
INDENT Source listing indentation Character value, *NONE Optional
CVTOPT Type conversion options Single values: *NONE
Other values (up to 4 repetitions): *DATETIME, *GRAPHIC, *VARCHAR, *VARGRAPHIC
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 Name, *JOBRUN, *JOB Optional
REPLACE Replace program *YES, *NO Optional
USRPRF User profile *USER, *OWNER Optional
AUT Authority Name, *LIBCRTAUT, *ALL, *CHANGE, *USE, *EXCLUDE Optional
TRUNCNBR Truncate numeric *YES, *NO Optional
FIXNBR Fix numeric Single values: *NONE
Other values (up to 2 repetitions): *ZONED, *INPUTPACKED
Optional
TGTRLS Target release Simple name, *CURRENT, *PRV Optional
ALWNULL Allow null values *NO, *INPUTONLY, *USRCTL, *YES Optional
DEFINE Define condition names Values (up to 32 repetitions): Simple name, *NONE Optional
ENBPFRCOL Enable performance collection *PEP, *ENTRYEXIT, *FULL Optional
PRFDTA Profiling data *NOCOL, *COL Optional
LICOPT Licensed Internal Code options Character value, X'' Optional
INCDIR Include directory Values (up to 32 repetitions): Path name, *NONE Optional
PGMINFO Generate program interface *NO, *PCML Optional
INFOSTMF Program interface stream file Path name Optional
PPGENOPT Preprocessor options Single values: *NONE, *DFT
Other values (up to 3 repetitions): *RMVCOMMENT, *NORMVCOMMENT, *EXPINCLUDE, *NOEXPINCLUDE, *SEQSRC, *NOSEQSRC
Optional
PPSRCFILE Output source file Qualified object name Optional
Qualifier 1: Output source file Name
Qualifier 2: Library Name, *CURLIB
PPSRCMBR Output source member Name, *PGM Optional
PPSRCSTMF Output stream file Path name, *SRCSTMF Optional
Top

Program (PGM)

Specifies the program name and library name for the program object (*PGM) you are creating. The program name and library name must conform to server naming conventions. If no library is specified, the created program is stored in the current library.

*CTLSPEC
The name for the compiled program is taken from the name specified in the DFTNAME keyword of the control specification. If the program name is not specified on the control specification and the source member is from a database file, the member name, specified by the SRCMBR parameter, is used as the program name. If the source is not from a database file then the program name defaults to RPGPGM.
program-name
Enter the name of the program object.
*CURLIB
The created program object is stored in the current library. If you have not specified a current library, QGPL is used.
library-name
Enter the name of the library where the created program object is to be stored.
Top

Source file (SRCFILE)

Specifies the name of the source file that contains the ILE RPG source member to be compiled and the library where the source file is stored. The recommended source physical file length is 112 characters: 12 for the sequence number and date, 80 for the code and 20 for the comments. This is the maximum amount of source that is shown on the compiler listing.

QRPGLESRC
The default source file QRPGLESRC contains the ILE RPG source member to be compiled.
source-file-name
Enter the name of the source file that contains the ILE RPG source member to be compiled.
*LIBL
The system searches the library list to find the library where the source file is stored. This is the default.
*CURLIB
The current library is used to find the source file. If you have not specified a current library, QGPL is used.
library-name
Enter the name of the library where the source file is stored.
Top

Source member (SRCMBR)

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

*PGM
Use the name specified for the PGM parameter as the source file member name. The compiled program object will have the same name as the source file member. If no program name is specified by the PGM parameter, the command uses the first member created in or added to the source file as the source member name.
source-file-member-name
Enter the name of the member that contains the ILE RPG source program.
Top

Source stream file (SRCSTMF)

Specifies the path name of the stream file containing the ILE RPG source code to be compiled.

The path name can be either absolutely or relatively qualified. An absolute path name starts with '/'; a relative path name starts with a character other than '/'.

If absolutely-qualified, the path name is complete. If relatively-qualified, the path name is completed by appending the job's current working directory to the path name.

The SRCMBR and SRCFILE parameters cannot be specified with the SRCSTMF parameter.

Top

Generation severity level (GENLVL)

Controls the creation of the program object. The program object is created if all errors encountered during compilation have a severity level less than or equal to the generation severity level specified.

The value must be between 0 and 20 inclusive. For errors greater than severity 20, the program object will not be generated.

10
A program object will be generated when the compile-time errors have a severity level less than or equal to 10. This is the default.
severity-level-value
Enter a number, 0 through 20 inclusive.
Top

Text 'description' (TEXT)

Allows you to enter text that briefly describes the program and its function. The text appears whenever program information is displayed.

*SRCMBRTXT
The text of the source member is used.
*BLANK
No text appears.
'description'
Enter the text that briefly describes the function of the source specifications. The text can be a maximum of 50 characters and must be enclosed in apostrophes. The apostrophes are not part of the 50-character string. Apostrophes are not required if you are entering the text on the prompt screen.
Top

Default activation group (DFTACTGRP)

Specifies whether the created program is intended to always run in the default activation group.

*YES
When this program is called it will always run in the default activation group. The default activation group is the activation group where all original program model (OPM) programs are run.

Specifying DFTACTGRP(*YES) allows ILE RPG programs to behave like OPM programs in the areas of file sharing, file scoping, and RCLRSC.

ILE static binding is not available when a program is created with DFTACTGRP(*YES). This means that you cannot use the BNDDIR or ACTGRP parameters when creating this program. In addition, any call operation in your source must call a program and not a procedure.

DFTACTGRP(*YES) is useful when attempting to move an application on a program-by-program basis to ILE RPG.

*NO
The program is associated with the activation group specified by the ACTGRP parameter. Static binding is allowed when *NO is specified.

If ACTGRP(*CALLER) is specified and this program is called by a program running in the default activation group, then this program will behave according to ILE semantics in the areas of file sharing, file scoping and RCLRSC.

DFTACTGRP(*NO) is useful when you intend to take advantage of ILE concepts, for example, running in a named activation group or binding to a service program.

Top

Activation group (ACTGRP)

Specifies the activation group this program is associated with when it is called.

QILE
When this program is called, it is activated into the named activation group QILE. This is the default.
*NEW
When this program is called, it is activated into a new activation group.
*CALLER
When this program is called, it is activated into the caller's activation group.
activation-group-name
Specify the name of the activation group to be used when this program is called.
Top

Binding directory (BNDDIR)

Specifies the list of binding directories that are used in symbol resolution.

*NONE
No binding directory is specified.
binding-directory-name
Specify the name of the binding directory used in symbol resolution. The directory name can be qualified with one of the following library values:
*LIBL
The system searches the library list to find the library where the binding directory is stored. This is the default.
*CURLIB
The current library for the job is searched. If no library is specified as the current library for the job, library QGPL is used.
*USRLIBL
Only the libraries in the user portion of the job's library list are searched.
library-name
Specify the name of the library to be searched.
Top

Compiler options (OPTION)

Specifies the options to use when the source member is compiled. You can specify any or all of the options in any order. Separate the options with one or more blank spaces. If an option is specified more than once, the last one is used.

*XREF
Produces a cross-reference listing (when appropriate) for the source member.
*NOXREF
A cross-reference listing is not produced.
*GEN
Create a program object if the highest severity level returned by the compiler does not exceed the severity specified in the GENLVL option.
*NOGEN
Do not create a program object.
*NOSECLVL
Do not print second-level message text on the line following the first-level message text.
*SECLVL
Print second-level message text on the line following the first-level message text in the Message Summary section.
*SHOWCPY
Show source records of members included by the /COPY compiler directive.
*NOSHOWCPY
Do not show source records of members included by the /COPY compiler directive.
*EXPDDS
Show the expansion of externally described files in the listing and display key field information.
*NOEXPDDS
Do not show the expansion of externally described files in the listing or display key field information.
*EXT
Show the list of external procedures and fields referenced during the compile on the listing.
*NOEXT
Do not show the list of external procedures and fields referenced during compilation on the listing.
*NOSHOWSKP
Do not show ignored statements in the source part of the listing. The compiler ignores statements as a result of /IF, /ELSEIF or /ELSE directives.
*SHOWSKP
Show all statements in the source part of the listing, regardless of whether or not the compiler has skipped them.
*NOSRCSTMT
Line Numbers in the listing are assigned sequentially; these numbers are used when debugging using statement numbers. Line Numbers are shown on the left-most column of the listing. The source IDs and SEU Sequence Numbers are shown on the two right-most columns of the listing.
*SRCSTMT
Statement numbers for debugging are generated using SEU sequence numbers and source IDs as follows:

Statement_Number = source_ID * 1000000 +
                   source_SEU_sequence_number

SEU Sequence Numbers are shown on the left-most column of the listing. Statement Numbers are shown on the right-most column of the listing; these numbers are used when debugging using statement numbers.

Note: When OPTION(*SRCSTMT) is specified, all sequence numbers in the source files must contain valid numeric values. If there are duplicate sequence numbers in the same source file, the behavior of the debugger may be unpredictable and statement numbers for diagnostic messages or cross reference entries may not be meaningful.

*DEBUGIO
Generate breakpoints for all input and output specifications.
*NODEBUGIO
Do not generate breakpoints for input and output specifications.
*NOEVENTF
Do not create an Event File for use by CoOperative Development Environment (CODE). CODE uses this file to provide error feedback integrated with the CODE editor. An Event File is normally created when you create a module or program from within CODE.
*EVENTF
Create an Event File for use by CoOperative Development Environment (CODE). The Event File is created as a member in file EVFEVENT in the library where the created module or program object is to be stored. If the file EVFEVENT does not exist it is automatically created. The Event File member name is the same as the name of the object being created.

CODE uses this file to provide error feedback integrated with the CODE editor. An Event File is normally created when you create a module or program from within CODE.

Top

Debugging views (DBGVIEW)

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

*STMT
Allows the program object to be debugged using the Line Numbers or Statement Numbers of the compiler listing. Line Numbers are shown on the left-most column of the source section of the compiler listing when OPTION(*NOSRCSTMT) is specified. Statement Numbers are shown on the right-most column of the source section of the compiler listing when OPTION(*SRCSTMT) is specified.
*SOURCE
Generates the source view for debugging the compiled program object. This view is not available if the root source member is a DDM file. Also, if changes are made to any source members after the compile and before attempting to debug the program, the views for those source members may not be usable.
*LIST
Generates the listing view for debugging the compiled program object. The information contained in the listing view is dependent on whether *SHOWCPY, *EXPDDS, and *SRCSTMT are specified for the OPTION parameter.

Note: The listing view will not show any indentation which you may have requested using the Indent option.

*COPY
Generates the source and copy views for debugging the compiled program object. The source view for this option is the same source view generated for the *SOURCE option. The copy view is a debug view which has all the /COPY source members included. These views are not available if the root source member is a DDM file. Also, if changes are made to any source members after the compile and before attempting to debug the program, the views for those source members may not be usable.
*ALL
Generates the listing, source and copy views for debugging the compiled program object. The information contained in the listing view is dependent on whether *SHOWCPY, *EXPDDS, and *SRCSTMT are specified for the OPTION parameter.
*NONE
Disables all of the debug options for debugging the compiled program object.
Top

Output (OUTPUT)

Specifies if a compiler listing is generated.

*PRINT
Produces a compiler listing, consisting of the ILE RPG program source and all compile-time messages. The information contained in the listing is dependent on whether *XREF, *SECLVL, *SHOWCPY, *EXPDDS, *EXT, *SHOWSKP, and *SRCSTMT are specified for the OPTION parameter.
*NONE
Do not generate the compiler listing.
Top

Optimization level (OPTIMIZE)

Specifies the level of optimization, if any, of the module.

*NONE
Generated code is not optimized. This is the fastest in terms of translation time. It allows variables to be displayed and modified while in debug mode.
*BASIC
Some optimization is performed on the generated code. This allows user variables to be displayed but not modified while in debug mode.
*FULL
Optimization which generates the most efficient code. Translation time is the longest. User variables may not be modified but may be displayed, although the presented values may not be the current values.
Top

Source listing indentation (INDENT)

Specifies whether structured operations should be indented in the source listing for enhanced readability. Also specifies the characters that are used to mark the structured operation clauses.

Note: Any indentation which you request here will not be reflected in the listing debug view which is created when you specify DBGVIEW(*LIST).

*NONE
Structured operations will not be indented in the source listing.
character-value
The source listing is indented for structured operation clauses. Alignment of statements and clauses are marked using the characters you choose. You can choose any character string up to 2 characters in length. If you want to use a blank in your character string, you must enclose the string in single quotation marks.

Note: The indentation may not appear as expected if there are errors in the program.

Top

Type conversion options (CVTOPT)

Specifies how the ILE RPG compiler handles date, time, timestamp, graphic data types, and variable-length data types which are retrieved from externally described database files.

*NONE
Ignores variable-length database data types and use the native RPG date, time, timestamp and graphic data types.
*DATETIME
Specifies that date, time, and timestamp database data types are to be declared as fixed-length character fields.
*GRAPHIC
Specifies that double-byte character set (DBCS) graphic data types are to be declared as fixed-length character fields.
*VARCHAR
Specifies that variable-length character data types are to be declared as fixed-length character fields.
*VARGRAPHIC
Specifies that variable-length double-byte character set (DBCS) graphic data types are to be declared as fixed-length character fields.
Top

Sort sequence (SRTSEQ)

Specifies the sort sequence table that is to be used in the ILE RPG source program.

*HEX
No sort sequence table is used.
*JOB
Use the SRTSEQ value for the job when the *PGM is created.
*JOBRUN
Use the SRTSEQ value for the job when the *PGM is run.
*LANGIDUNQ
Use a unique weighted table. This special value is used in conjunction with the LANGID parameter to determine the proper sort sequence table.
*LANGIDSHR
Use a shared weighted table. This special value is used in conjunction with the LANGID parameter to determine the proper sort sequence table.
sort-table-name
Enter the qualified name of the sort sequence table to be used with the program.
*LIBL
The system searches the library list to find the library where the sort sequence table is stored.
*CURLIB
The current library is used to find the sort sequence table. If you have not specified a current library, QGPL is used.
library-name
Enter the name of the library where the sort sequence table is stored.
Top

Language identifier (LANGID)

Specifies the language identifier to be used when the sort sequence is *LANGIDUNQ and *LANGIDSHR. The LANGID parameter is used in conjunction with the SRTSEQ parameter to select the sort sequence table.

*JOBRUN
Use the LANGID value associated with the job when the RPG program is executed.
*JOB
Use the LANGID value associated with the job when the RPG program is created.
language-identifier
Use the language identifier specified. (For example, FRA for French and DEU for German.)
Top

Replace program (REPLACE)

Specifies if a new program is created when a program of the same name already exists in the specified (or implied) library. The intermediate modules created during the processing of the CRTBNDRPG command are not subject to the REPLACE specifications, and have an implied REPLACE(*NO) against the QTEMP library. The intermediate modules are deleted once the CRTBNDRPG command has completed processing.

*YES
A new program is created in the specified library. The existing program of the same name in the specified library is moved to library QRPLOBJ.
*NO
A new program is not created if a program of the same name already exists in the specified library. The existing program is not replaced, a message is displayed, and compilation stops.
Top

User profile (USRPRF)

Specifies the user profile that will run the created program object. 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). This parameter is not updated if the program already exists. To change the value of USRPRF, delete the program and recompile using the correct value (or, if the constituent *MODULE objects exist, you may choose to invoke the CRTPGM command).

*USER
The program runs under the user profile of the program's user.
*OWNER
The program runs under the user profile of both the program's user and owner. The collective set of object authority in both user profiles are used to find and access objects while the program is running. Any object created during the program are owned by the program's user.
Top

Authority (AUT)

Specifies the authority given to users who do not have specific authority to the object, who are not on the authorization list, and whose user group has no specific authority to the object. The authority can be altered for all or for specified users after the program is created with the CL commands Grant Object Authority (GRTOBJAUT) or Revoke Object Authority (RVKOBJAUT). For further information on these commands, see the CL concepts and reference topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.

*LIBCRTAUT
The public authority for the object is taken from the CRTAUT keyword of the target library (the library that contains the object). The value is determined when the object is created. If the CRTAUT value for the library changes after the create, the new value will not affect any existing objects.
*ALL
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 this security for it, change it, and perform basic functions on it, but cannot transfer its ownership.
*CHANGE
Provides all data authority and the authority to perform 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.
*USE
Provides object operational authority and read authority; authority for basic operations on the program object. 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. Use EDTOBJAUT, GRTOBJAUT or RVKOBJAUT to change the authority of the created program.

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 is prevented from accessing the object.
authorization-list name
Enter the name of an authorization list of users and authorities to which the program is added. The program object will be secured by this authorization list, and the public authority for the program object will be set to *AUTL. The authorization list must exist on the system when the CRTBNDRPG command is issued.

Note: Use the AUT parameter to reflect the security requirements of your system. The security facilities available are described in detail in iSeries Security Reference, SC41-5302.

Top

Truncate numeric (TRUNCNBR)

Specifies if the truncated value is moved to the result field or if an error is generated when numeric overflow occurs while running the program.

Note: The TRUNCNBR option does not apply to calculations performed within expressions. (Expressions are found in the Extended-Factor 2 field.) If overflow occurs for these calculations, an error will always occur.

*YES
Ignore numeric overflow and move the truncated value to the result field.
*NO
When numeric overflow is detected, a run-time error is generated.
Top

Fix numeric (FIXNBR)

Specifies whether decimal data that is not valid is fixed by the compiler.

*NONE
Indicates that decimal data that is not valid will result in decimal errors during run time if used.
*ZONED
Zoned decimal data that is not valid will be fixed by the compiler on the conversion to packed data. Blanks in numeric fields will be treated as zeros. Each decimal digit will be checked for validity. If a decimal digit is not valid, it is replaced with zero. If a sign is not valid, the sign will be forced to a positive sign code of hex 'F'. If the sign is valid, it will be changed to either a positive sign hex 'F' or a negative sign hex 'D' as appropriate. If the resulting packed data is not valid, it will not be fixed.
*INPUTPACKED
Indicates that if packed decimal data that is not valid is encountered while processing input specifications, the internal variable will be set to zero.
Top

Target release (TGTRLS)

Specifies the release of the operating system on which you intend to use the object being created. In the examples given for the *CURRENT and *PRV values, and 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, V2R3M0 is version 2, release 3, modification level 0.

Valid values for this parameter change every release. The possible values are:

*CURRENT
The object is to be used on the release of the operating system currently running on your system. For example, if V2R3M5 is running on the system, *CURRENT means that you intend to use the object on a system with V2R3M5 installed. You can also use the object on a system with any subsequent release of the operating system installed.

Note: If V2R3M5 is running on the system, and the object is to be used on a system with V2R3M0 installed, specify TGTRLS(V2R3M0), not TGTRLS(*CURRENT).

*PRV
The object is to be used on the previous release with modification level 0 of the operating system. For example, if V2R3M5 is running on your system, *PRV means you intend to use the object on a system with V2R2M0 installed. You can also use the object on a system with any subsequent release of the operating system installed.
target-release
Specify the release in the format VxRxMx. You can use the object 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. If you specify a target-release that is earlier than the earliest release supported by this command, an error message is sent indicating the earliest supported release.

Note: The current version of the command may support options that are not available in previous releases of the command. If the command is used to create objects that are to be used on a previous release, it will be processed by the compiler appropriate to that release, and any unsupported options will not be recognized. The compiler will not necessarily issue any warnings regarding options that it is unable to process.

Top

Allow null values (ALWNULL)

Specifies how the ILE RPG program will be allowed to use records containing null-capable fields from externally described database files.

*NO
Specifies that the ILE RPG program will not process records with null-value fields from externally described files. If you attempt to retrieve a record containing null values, no data in the record is accessible to the ILE RPG program and a data-mapping error occurs.
*INPUTONLY
Specifies that the ILE RPG program can successfully read records with null-capable fields containing null values from externally described input-only database files. When a record containing null values is retrieved, no data mapping errors occur and the database default values are placed into any fields which contain null values. The program cannot do any of the following:
  • use null-capable key fields
  • create or update records containing null-capable fields
  • determine whether a null-capable field is actually null while the program is running
  • set a null-capable field to be null.
*USRCTL
Specifies that the ILE RPG program can read, write and update records with null values from externally described database files. Records with null keys can be retrieved using keyed operations. The program can determine whether a null-capable field is actually null, and it can set a null-capable field to be null for output or update. The programmer is responsible for ensuring that fields containing null values are used correctly within the program.
*YES
Same as *INPUTONLY.
Top

Define condition names (DEFINE)

Specifies condition names that are defined before the compilation begins. Using the parameter DEFINE(condition-name) is equivalent to coding the /DEFINE condition-name directive on the first line of the source file.

*NONE
No condition names are defined. This is the default.
condition-name
Up to 32 condition names can be specified. Each name can be up to 50 characters long. The condition names will be considered to be defined at the start of compilation.
Top

Enable performance collection (ENBPFRCOL)

Specifies whether performance collection is enabled.

*PEP
Performance statistics are gathered on the entry and exit of the program entry procedure only. This applies to the actual program-entry procedure for a program, not the main procedure of the modules within the program. This is the default.
*ENTRYEXIT
Performance statistics are gathered on the entry and exit of all procedures of the program.
*FULL
Performance statistics are gathered on entry and exit of all procedures. Also, statistics are gathered before and after each call to an external procedure.
Top

Profiling data (PRFDTA)

Specifies the program profiling data attribute for the program. Program profiling is an advanced optimization technique used to reorder procedures and code within the procedures based on statistical data (profiling data).

*NOCOL
This program is not enabled to collect profiling data. This is the default.
*COL
The program is enabled to collect profiling data. *COL can be specified only when the optimization level of the module is *FULL, and when compiling with a target release of *CURRENT.

Note: If you use the BNDDIR parameter to bind additional modules and service programs, these additional objects are not affected when *COL or *NOCOL is specified for the program. The program profiling data attribute for a module is set when the module is created.

Top

Licensed Internal Code options (LICOPT)

Specifies one or more Licensed Internal Code compile-time options. This parameter allows individual compile-time options to be selected, and is intended for the advanced programmer who understands the potential benefits and drawbacks of each selected type of compiler option.

Top

Include directory (INCDIR)

Specifies one or more directories to add to the search path used by the compiler to find copy files. The compiler will search the directories specified here if the copy files in the source program can not be resolved.

*NONE
No user directories are searched for copy files. By default, the source directory will still be searched.
'directory'
Specify up to 32 directories in which to search for copy files. In addition to the specified directories, the source directory is also searched for copy files.
Top

Generate program interface (PGMINFO)

Specifies whether program interface information should be generated into a stream file. The possible values are:

*NO
This option specifies the default which does not generate program interface information.
*PCML
Specifies that PCML (Program Call Markup Language) should be generated into a stream file. The generated PCML makes it easier for Java methods to call this RPG program, with less Java code. The name of a stream file that will contain the generated PCML must be specified on the INFOSTMF option.
Top

Program interface stream file (INFOSTMF)

Specifies the path name of the stream file to contain the generated program interface information specifed on the PGMINFO option.

The path name can be either absolutely or relatively qualified. An absolute path name starts with '/'; a relative path name starts with a character other than '/'.

If absolutely-qualified, the path name is complete. If relatively-qualified, the path name is completed by appending the job's current working directory to the path name.

This parameter can only be specified when the PGMINFO parameter has a value other than *NO.

Top

Preprocessor options (PPGENOPT)

Specifies the preprocessor generation options to use when the source code is compiled.

The possible options are:

*NONE
Run the entire compiler against the source file. Do not copy the preprocessor output to a file.
*DFT
Run the preprocessor against the input source. *RMVCOMMENT, *EXPINCLUDE and *NOSEQSRC will be used as the options for generating the preprocessor output. Use PPSRCFILE and PPSRCMBR to specify an output source file and member, or PPSRCSTMF to specify a stream file to contain the preprocessor output.
*RMVCOMMENT
Remove comments, blank lines, and most directives during preprocessing. Retain only the RPG specifications and any directives necessary for the correct interpretation of the specifications.
*NORMVCOMMENT
Preserve comments, blank lines and listing-control directives (for example /EJECT, /TITLE) during preprocessing. Transform source-control directives (for example /COPY, /IF) to comments during preprocessing.
*EXPINCLUDE
Expand /INCLUDE directives in the generated output file.
*NOEXPINCLUDE
/INCLUDE directives are placed unchanged in the generated output file.

Note: /COPY directives are always expanded.

*SEQSRC
If PPSRCFILE is specified, the generated output member has sequential sequence numbers, starting at 000001 and incremented by 000001.
*NOSEQSRC
If PPSRCFILE is specified, the generated output member has the same sequence numbers as the original source read by the preprocessor.
Top

Output source file (PPSRCFILE)

Specifies the source file name and library for the preprocessor output.

source-file-name
Specify the name of the source file for the preprocessor output.

The possible library values are:

*CURLIB
The preprocessor output is created in the current library. If a job does not have a current library, the preprocessor output file is created in the QGPL library.
library-name
Specify the name of the library for the preprocessor output.
Top

Output source member (PPSRCMBR)

Specifies the name of the source file member for the preprocessor output.

*PGM
The name supplied on the PGM parameter is used as the preprocessor output member name.
member-name
Specify the name of the member for the preprocessor output.
Top

Output stream file (PPSRCSTMF)

Specifies the path name of the stream file for the preprocessor output.

*SRCSTMF
The path name supplied on the SRCSTMF parameter is used as the preprocessor output path name. The file will have the extension '.i'.
'path-name'
Specify the path name for the preprocessor output stream file.

The path name can be either absolutely or relatively qualified. An absolute path name starts with '/'; a relative path name starts with a character other than '/'.

If absolutely-qualified, the path name is complete. If relatively-qualified, the path name is completed by appending the job's current working directory to the path name.

Top

Examples

Example 1: Compiling a Source Program into a Program Object

CRTBNDRPG   PGM(MYLIB/XMPLE1)
            SRCFILE(MYLIB/QRPGSRC)  SRCMBR(XMPLE1)
            OUTPUT(*PRINT)  TEXT('My RPG IV Program')

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

Top

Error messages

*ESCAPE Messages

RNS9310
Compilation failed. Program &1 not created in library &2.
Top