Create RPG Module (CRTRPGMOD)

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

Create RPG Module

The Create RPG Module (CRTRPGMOD) command compiles the RPG source code to create a module object (*MODULE). You can use this command in either batch or interactive mode.

Top

Parameters

Keyword Description Choices Notes
MODULE Module Qualified object name Optional, Positional 1
Qualifier 1: Module 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, *MODULE 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
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 module *YES, *NO 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
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
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, *MODULE Optional
PPSRCSTMF Output stream file Path name, *SRCSTMF Optional
Top

Module (MODULE)

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

*CTLSPEC
The name for the compiled module is taken from the name specified in the DFTNAME keyword of the control specification. If the module 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 module name. If the source is not from a database file then the module name defaults to RPGMOD.
module-name
Enter the name of the module object.
*CURLIB
The compiled module 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 compiled module 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. This is the default.
*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 specifications to be compiled.

*MODULE
Use the name specified for the MODULE parameter as the source file member name. The compiled module object will have the same name as the source file member. If no module name is specified for the MODULE 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 specifications.
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 module object. The module 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 module object will not be generated.

10
A module 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 module and its function. The text appears whenever module information is displayed.

*SRCMBRTXT
The text of the source member is used. This is the default.
*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

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
Does not produce a cross-reference listing.
*GEN
Creates a module object that can be bound using the CRTPGM command if the highest severity level returned by the compiler does not exceed the severity specified in the GENLVL option.
*NOGEN
A module object will not be created.
*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 module object, and which source views are available for source-level debugging.

*STMT
Allows the module 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 module 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 module 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 module 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 module 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 module object.
Top

Output (OUTPUT)

Specifies if a compiler listing is generated.

*PRINT
Produces a compiler listing, consisting of the ILE RPG module 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. This is the default.
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 module.

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 uses 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 from the job when the module is created.
*JOBRUN
Use the SRTSEQ value from the job when the module is run (after being bound).
*LANGIDUNQ
Use a unique weighted table. This special value is used in conjunction with the LANGID parameter to select the proper sort sequence table.
*LANGIDSHR
Use a shared weighted table. This special value is used in conjunction with the LANGID parameter to select the proper sort sequence table.
sort-table-name
Enter the name of the sort sequence table.
*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 or *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 module is run (after being bound).
*JOB
Use the LANGID value associated with the job when the RPG module is created.
language-identifier
Use the language identifier specified. (For example, FRA for French and DEU for German).
Top

Replace module (REPLACE)

Specifies whether a new module object is created if a module of the same name already exists in the specified library.

*YES
A new module object is created in the specified library. The existing module object of the same name in the specified library is moved to library QRPLOBJ.
*NO
A new module object is not created if a module object of the same name already exists in the specified library.
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 module 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 module object except those limited to the owner or controlled by authorization list management authority. The user can control the module 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 module 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 module object such as binding it into a 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 or service program containing the module. 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 or service program.

If you do not want any users to be able to dump the variables, then remove the observable information using Change Module (CHGMOD) on the module, or using Change Program (CHGPGM) or Change Service Program (CHGSRVPGM) on the program containing the module.

*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 module is added. The module object will be secured by this authorization list, and the public authority for the module object will be set to *AUTL. The authorization list must exist on the system when the CRTRPGMOD 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 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 module will be allowed to use records containing null-capable fields from externally described database files.

*NO
Specifies that the ILE RPG module 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 module and a data-mapping error occurs.
*INPUTONLY
Specifies that the ILE RPG module 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 module 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 module is running
  • set a null-capable field to be null.
*USRCTL
Specifies that the ILE RPG module 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 module 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 module.
*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.
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 module.
*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 module. Program profiling is an advanced optimization technique used to reorder procedures and code within the procedures based on statistical data (profiling data).

*NOCOL
This module is not enabled to collect profiling data. This is the default.
*COL
This module 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.
Top

Binding directory (BNDDIR)

Specifies the list of binding directories that are used in symbol resolution for a module. The search for a binding directory is done when the module is bound at CRTPGM or CRTSRVPGM time.

*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 resolved at compile time. It is then used to search for the binding directory when the module is bound. If no library is specified as the current library for the job, library QGPL is used.
library-name
Specify the name of the library to be searched.
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 the procedures in this RPG module, 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.

*MODULE
The name supplied on the MODULE 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 Module into a Module Object

CRTRPGMOD   MODULE(MYLIB/XMPLE1)
            SRCFILE(MYLIB/QRPGLESRC)  SRCMBR(XMPLE1)
            OUTPUT(*PRINT)  TEXT('My RPG IV module')

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

Top

Error messages

*ESCAPE Messages

RNS9309
Compilation failed. Module &1 not created in library &2.
Top