Command reference / prog
CRTBNDRPG
Create Bound RPG Program
Compiles and binds ILE RPG source code to create an ILE program object (*PGM). It can be used interactively or in batch mode.
Allowed environments: *ALL.
Positional parameters: 3.
Parameters
PGM
Program
Specifies the program name and library for the program object to be created. Names must follow server naming conventions; if no library is given, the program is created in the current library.
*CTLSPEC- Name taken from the DFTNAME keyword of the control specification; else the member name for a database source; else RPGPGM.
*CURLIB- Stored in the job's current library; QGPL if none is set.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Program
Program
Suggested / special values:
*CTLSPEC
Library
Library
Suggested / special values:
*CURLIB
SRCFILE
Source file
Specifies the source file containing the ILE RPG member to be compiled and the library where it is stored. The recommended record length is 112.
*LIBL- Searches the library list for the source file; this is the default.
*CURLIB- Uses the current library; QGPL if none is set.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Source file
Source file
Library
Library
Suggested / special values:
*LIBL, *CURLIB
SRCMBR
Source member
Specifies the member of the source file that contains the ILE RPG program to be compiled.
Suggested / special values:
*PGM
*PGM- Uses the name given on PGM as the member name; if no program name is given, the first member added to the file is used.
SRCSTMF
Source stream file
Specifies the path name of the stream file containing the ILE RPG source. Cannot be used with SRCMBR or SRCFILE.
GENLVL
Generation severity level
Determines whether a program object is created, based on the highest compile-time error severity; the value is 0 to 20.
TEXT
Text 'description'
Briefly describes the program and its function; up to 50 characters.
Suggested / special values:
*SRCMBRTXT, *BLANK
*SRCMBRTXT- The text of the source member is used.
*BLANK- No text appears.
DFTACTGRP
Default activation group
Specifies whether the program always runs in the default activation group, which allows OPM-like file sharing, file scoping and RCLRSC behavior.
Allowed values:
*YES, *NO
*YES- Always runs in the default activation group; static binding (BNDDIR, ACTGRP) is not available and calls must target programs, not procedures.
*NO- Runs in the activation group given by ACTGRP; static binding is allowed.
ACTGRP
Activation group
Specifies the activation group the program is associated with when it is called.
Suggested / special values:
*STGMDL, *NEW, *CALLER
*STGMDL- Activated into QILETS if STGMDL(*TERASPACE) is specified; otherwise into QILE.
*NEW- Activated into a new activation group when called.
*CALLER- Activated into the caller's activation group.
STGMDL
Storage model
Specifies the storage model attribute of the program.
Allowed values:
*SNGLVL, *INHERIT, *TERASPACE
*SNGLVL- Single-level storage model; runs only in a single-level storage activation group.
*TERASPACE- Teraspace storage model; runs only in a teraspace storage activation group.
*INHERIT- Adopts the storage model of the activation group it is activated into; requires ACTGRP(*CALLER).
BNDDIR
Binding directory
Specifies the binding directories used in symbol resolution, up to 50.
Suggested / special values:
*NONE
*NONE- No binding directory is specified.
*LIBL- Searches the library list for the binding directory; the default.
*CURLIB- Searches the job's current library; QGPL if none is set.
*USRLIBL- Searches only the user portion of the job's library list.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Binding directory
Binding directory
Library
Library
Suggested / special values:
*LIBL, *CURLIB, *USRLIBL
OPTION
Compiler options
Specifies options used when the source member is compiled. Options may be given in any order, separated by blanks; the last duplicate wins. Common values are listed here; the page lists more.
Allowed values:
*XREF, *NOXREF, *GEN, *NOGEN, *SECLVL, *NOSECLVL, *SHOWCPY, *NOSHOWCPY, *EXPDDS, *NOEXPDDS, *EXT, *NOEXT, *NOSHOWSKP, *SHOWSKP, *NOSRCSTMT, *SRCSTMT, *DEBUGIO, *NODEBUGIO, *UNREF, *NOUNREF, *NOEVENTF, *EVENTF
*XREF- Produces a cross-reference listing.
*NOXREF- No cross-reference listing.
*GEN- Creates a program object if the highest severity does not exceed GENLVL.
*NOGEN- Does not create a program object.
*SECLVL- Prints second-level message text in the Message Summary.
*NOSECLVL- No second-level message text.
*SHOWCPY- Shows source records of members included by /COPY.
*NOSHOWCPY- Does not show /COPY source records.
*EXPDDS- Shows expansion of externally described files and key field information.
*NOEXPDDS- Does not show DDS expansion.
*SRCSTMT- Statement numbers use SEU sequence numbers and source IDs (source_ID * 1000000 + sequence number).
*NOSRCSTMT- Listing line numbers are assigned sequentially for debugging.
*DEBUGIO- Generates breakpoints for input and output specifications.
*NODEBUGIO- No breakpoints for input and output specifications.
*UNREF- Unreferenced data items are included in the module.
*NOUNREF- Unreferenced data items are excluded, reducing storage.
*EVENTF- Creates an event file for client tooling in file EVFEVENT.
*NOEVENTF- No event file for client tooling.
DBGVIEW
Debugging views
Specifies which debugging level is available and which source views can be used for source-level debugging.
Allowed values:
*STMT, *SOURCE, *LIST, *COPY, *ALL, *NONE
*STMT- Debugging by line numbers or statement numbers.
*SOURCE- Source view generated; not available if the root source member is a DDM file.
*LIST- Listing view generated.
*COPY- Source and copy views generated.
*ALL- Listing, source and copy views generated.
*NONE- Disables all debug options.
DBGENCKEY
Debug encryption key
Specifies the key used to encrypt program source embedded in debug views. A key of 1 to 16 bytes.
Suggested / special values:
*NONE
*NONE- No encryption key is specified.
OUTPUT
Output
Specifies whether a compiler listing is generated.
Allowed values:
*PRINT, *NONE
*PRINT- Produces a compiler listing with source and compile-time messages.
*NONE- Does not generate the compiler listing.
OPTIMIZE
Optimization level
Specifies the level of optimization of the module.
Allowed values:
*NONE, *BASIC, *FULL
*NONE- Not optimized; fastest translation, and variables can be displayed and modified in debug mode.
*BASIC- Some optimization; variables can be displayed but not modified in debug mode.
*FULL- Most efficient code; translation takes longest; displayed values may not be current.
INDENT
Source listing indentation
Specifies whether structured operations are indented in the source listing, and the characters that mark clauses. Not reflected in the DBGVIEW(*LIST) view.
Suggested / special values:
*NONE
*NONE- Structured operations are not indented.
CVTOPT
Type conversion options
Specifies how date, time, timestamp, graphic and variable-length data types from externally described files are handled.
Allowed values:
*NONE, *DATETIME, *GRAPHIC, *VARCHAR, *VARGRAPHIC
*NONE- Uses the native RPG date, time, timestamp and varying-length types.
*DATETIME- Date, time and timestamp types are declared as fixed-length character fields.
*GRAPHIC- DBCS graphic types are declared as fixed-length character fields.
*VARCHAR- Variable-length character types are declared as fixed-length character fields.
*VARGRAPHIC- Variable-length DBCS graphic types are declared as fixed-length character fields.
SRTSEQ
Sort sequence
Specifies the sort sequence table used in the ILE RPG source program.
*HEX- No sort sequence table is used.
*JOB- The job's SRTSEQ when the *PGM is created.
*JOBRUN- The job's SRTSEQ when the *PGM is run.
*LANGIDUNQ- Unique-weighted table; used with LANGID.
*LANGIDSHR- Shared-weighted table; used with LANGID.
*LIBL- Searches the library list for the sort table.
*CURLIB- Uses the current library for the sort table; QGPL if none is set.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Sort sequence
Sort sequence
Library
Library
Suggested / special values:
*LIBL, *CURLIB
LANGID
Language identifier
Specifies the language identifier used when SRTSEQ is *LANGIDUNQ or *LANGIDSHR, for example FRA or DEU.
Suggested / special values:
*JOBRUN, *JOB
*JOBRUN- Uses the job's LANGID when the RPG program runs.
*JOB- Uses the job's LANGID when the RPG program is created.
REPLACE
Replace program
Specifies whether a new program is created when a program of the same name already exists in the library. Intermediate modules are not subject to REPLACE.
Allowed values:
*YES, *NO
*YES- The existing program is moved to library QRPLOBJ and replaced.
*NO- The existing program is not replaced; a message is shown and compilation stops.
USRPRF
User profile
Specifies the user profile that runs the program. Not updated if the program already exists.
Allowed values:
*USER, *OWNER
*USER- The program runs under the profile of its user.
*OWNER- Runs under the profiles of both the user and the owner; objects created are owned by the user.
AUT
Authority
Specifies the authority given to users without specific authority, not on an authorization list, and whose user group has none.
Suggested / special values:
*LIBCRTAUT, *ALL, *CHANGE, *USE, *EXCLUDE
*LIBCRTAUT- Public authority taken from the CRTAUT value of the target library at creation time.
*ALL- All operations except those limited to the owner or authorization list management; cannot transfer ownership.
*CHANGE- All data authority and all operations except owner-limited ones.
*USE- Object operational and read authority; the user cannot change the program.
*EXCLUDE- The user is prevented from accessing the object.
TRUNCNBR
Truncate numeric
Specifies whether a truncated value is moved to the result field or a run-time error is generated on numeric overflow. Does not apply within expressions.
Allowed values:
*YES, *NO
*YES- Overflow is ignored and the truncated value is moved to the result field.
*NO- A run-time error is generated on numeric overflow.
FIXNBR
Fix numeric
Specifies whether invalid decimal data is fixed by the compiler.
Allowed values:
*NONE, *ZONED, *INPUTPACKED
*NONE- Invalid decimal data causes decimal errors at run time when used.
*ZONED- Invalid zoned decimal digits are replaced with zero during conversion to packed data; blanks are treated as zeros.
*INPUTPACKED- Invalid packed decimal data read through input specifications is set to zero.
TGTRLS
Target release
Specifies the operating system release on which the object will be used, in VxRxMx format.
Suggested / special values:
*CURRENT, *PRV
*CURRENT- The release currently running; the object can also be used on later releases.
*PRV- The previous release with modification level 0; the object can also be used on later releases.
ALWNULL
Allow null values
Specifies how records containing null-capable fields from externally described files are handled.
Allowed values:
*NO, *INPUTONLY, *USRCTL, *YES
*NO- Records with null values are not processed; retrieving one causes a data-mapping error.
*INPUTONLY- Null-capable input-only records can be read, with database defaults placed in null fields; they cannot be used as keys or written.
*USRCTL- Records can be read, written and updated with null values; the program can test and set nulls.
*YES- Same as *INPUTONLY.
DEFINE
Define condition names
Specifies condition names defined before compilation begins, equivalent to a /DEFINE directive on the first line. Up to 32 names of up to 50 characters.
Suggested / special values:
*NONE
*NONE- No condition names are defined.
ENBPFRCOL
Enable performance collection
Specifies whether performance statistics are gathered.
Allowed values:
*PEP, *ENTRYEXIT, *FULL
*PEP- Statistics gathered only at entry and exit of the program entry procedure; the default.
*ENTRYEXIT- Statistics gathered at entry and exit of all procedures.
*FULL- Statistics gathered at entry and exit of all procedures, and before and after each call to an external procedure.
PRFDTA
Profiling data
Specifies the program profiling data attribute, used to reorder procedures and code based on profiling data.
Allowed values:
*NOCOL, *COL
*NOCOL- Not enabled to collect profiling data; the default.
*COL- Enabled to collect profiling data; requires module optimization *FULL and target release *CURRENT.
LICOPT
Licensed Internal Code options
Specifies one or more Licensed Internal Code compile-time options; intended for advanced programmers.
INCDIR
Include directory
Specifies up to 32 directories added to the compiler search path for copy files.
Suggested / special values:
*NONE
*NONE- No user directories are searched for copy files; the source directory is still searched.
PGMINFO
Program interface information
Specifies whether program interface information is generated and where it is stored. Element 1 is Generate; element 2 is Location.
*NO- No program interface information is generated; the default.
*PCML- Generates PCML so Java methods can call the RPG program more easily.
*STMF- Location: written to the stream file named by INFOSTMF.
*MODULE- Location: stored in the RPG module created as the first step.
*ALL- Location: written to the stream file and also stored in the module.
Elements in order
Generate
Generate
Allowed values:
*NO, *PCML
Location
Location
Allowed values:
*STMF, *MODULE, *ALL
INFOSTMF
Program interface stream file
Specifies the path name of the stream file receiving the PGMINFO output. Can only be specified when PGMINFO is not *NO.
PPGENOPT
Preprocessor options
Specifies the preprocessor generation options used when the source is compiled.
Allowed values:
*NONE, *DFT, *RMVCOMMENT, *NORMVCOMMENT, *EXPINCLUDE, *NOEXPINCLUDE, *SEQSRC, *NOSEQSRC
*NONE- Runs the entire compiler on the source; no preprocessor output is copied to a file.
*DFT- Runs the preprocessor; uses *RMVCOMMENT, *EXPINCLUDE and *NOSEQSRC.
*RMVCOMMENT- Removes comments, blank lines and most directives from the preprocessor output.
*NORMVCOMMENT- Preserves comments, blank lines and listing-control directives.
*EXPINCLUDE- Expands /INCLUDE directives in the output file.
*NOEXPINCLUDE- Leaves /INCLUDE directives unchanged in the output file.
*SEQSRC- Output member gets sequential sequence numbers starting at 000001.
*NOSEQSRC- Output member keeps the sequence numbers of the original source.
PPSRCFILE
Output source file
Specifies the source file name and library for the preprocessor output.
*CURLIB- Output is created in the current library; QGPL if the job has none.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Output source file
Output source file
Library
Library
Suggested / special values:
*CURLIB
PPSRCMBR
Output source member
Specifies the member name for the preprocessor output.
Suggested / special values:
*PGM
*PGM- The PGM name is used as the output member name.
PPSRCSTMF
Output stream file
Specifies the path name of the stream file for the preprocessor output. The file gets the extension .i.
Suggested / special values:
*SRCSTMF
*SRCSTMF- The SRCSTMF path name is used for the output path name.
TGTCCSID
Target CCSID
Specifies the CCSID the compiler uses to read the source files; 1 to 65534 may also be given.
Suggested / special values:
*SRC, *JOB
*SRC- Read in the CCSID of the primary source file; the default.
*JOB- Read in the job CCSID; if that is 65535, the job's default CCSID is used.
REQPREXP
Require prototype for export
Specifies whether prototypes are required for the main procedure and exported procedures.
Allowed values:
*NO, *WARN, *REQUIRE
*NO- Prototypes are not required; the default.
*WARN- A severity-10 warning is issued if a prototype is missing.
*REQUIRE- A prototype is required; a severity-30 error is issued if missing.
Examples
CRTBNDRPG PGM(MYLIB/XMPLE1) SRCFILE(MYLIB/QRPGLESRC) SRCMBR(XMPLE1) OUTPUT(*PRINT) TEXT('My RPG IV Program')
Calls the ILE RPG compiler to create program XMPLE1 from member XMPLE1 of the ILE RPG source file in library MYLIB. A compiler listing is created.
Generated from os/cl/catalog/CRTBNDRPG.json and os/cl/help/CRTBNDRPG.json.