Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Convert RPG Source (CVTRPGSRC) command converts RPG III or RPG/400 source code to ILE RPG source code.
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
FROMFILE | From file | Qualified object name | Required, Positional 1 |
Qualifier 1: From file | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
FROMMBR | From member | Generic name, name, *ALL | Required, Positional 2 |
TOFILE | To file | Single values: *NONE Other values: Qualified object name |
Optional, Positional 3 |
Qualifier 1: To file | Name, QRPGLESRC | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
TOMBR | To member | Name, *FROMMBR | Optional, Positional 4 |
EXPCPY | Expand copy member | *NO, *YES | Optional |
CVTRPT | Print conversion report | *YES, *NO | Optional |
SECLVL | Include second level text | *NO, *YES | Optional |
INSRTPL | Insert specification template | *NO, *YES | Optional |
LOGFILE | Log file | Single values: *NONE Other values: Qualified object name |
Optional |
Qualifier 1: Log file | Name, QRNCVTLG | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
LOGMBR | Log file member | Name, *FIRST, *LAST | Optional |
Top |
Specifies the name of the source file that contains the RPG III or RPG/400 source code to be converted and the library where the source file is stored. This is a required parameter; there is no default file name.
Top |
Specifies the name(s) of the source member(s) to be converted. This is a required parameter; there is no default member name.
The valid source member types of source members to be converted are RPG, RPT, RPG38, RPT38, SQLRPG and blank. The Convert RPG Source command does not support source member types RPG36, RPT36 and other non-RPG source member types (for example, CLP and TXT).
Top |
Specifies the name of the source file that contains the converted source members and the library where the converted source file is stored. The converted source file must exist and should have a record length of 112 characters: 12 for the sequence number and date, 80 for the code and 20 for the comments.
This feature allows you to find some potential problems without having to create the converted source member.
The TOFILE source file name must be different from the FROMFILE source file name if the TOFILE library name is the same as the FROMFILE library.
Top |
Specifies the name(s) of the converted source member(s) in the converted source file. If the value specified on the FROMMBR parameter is (*ALL) or generic*, then TOMBR must be equal to *FROMMBR.
Top |
Specifies whether a /COPY member(s) is expanded into the converted source member. EXPCPY(*YES) should be specified only if you are having conversion problems pertaining to /COPY members.
Note: If the member is of type RPT or RPT38, EXPCPY(*YES) or EXPCPY(*NO) has no effect because the auto report program will always expand the /COPY members.
Top |
Specifies whether or not a conversion report is printed.
Top |
Specifies whether second-level text is printed in the conversion report.
Top |
Specifies if the ILE RPG specification templates (H-, F-, D-, I-, C- and/or O-specification template) are inserted in the converted source member(s).
Top |
Specifies the name of the log file that is used to track the conversion information. Unless *NONE is specified, there must be a log file. The file must already exist, and it must be a physical data file. Create the log file by using the CPYF command with the "From object" file QARNCVTLG in library QRPGLE and the "New object" file QRNCVTLG in your library.
Top |
Specifies the name of the log file member used to track conversion information. The new information is added to the existing data in the specified log file member.
If the log file contains no members, then a member having the same name as the log file is created.
Top |
Example 1: Converting RPG III Source to RPG IV Source
CVTRPGSRC FROMFILE(MYLIB/QRPGSRC) FROMMBR(XMPLE1) TOFILE(MYLIB/QRPGLESRC) TOMBR(*FROMMBR) EXPCPY(*NO) CVTRPT(*YES) LOGFILE(MYLIB/QRNCVTLG)
This command converts the RPG III source member XMPLE1 in file MYLIB/QRPGSRC to an RPG IV source member of the same name in file MYLIB/QRPGLESRC. /COPY statements in the RPG III program are not expanded; they remain as /COPY statements in the RPG IV program. A report is printed. The status of each conversion is placed in the file MYLIB/QRNCVTLG.
Top |
Top |