This section explains how to convert source programs to the RPG IV format.
It discusses the command CVTRPGSRC, which starts the Conversion Aid, and how
to use it.
To convert your source code to the RPG IV format, follow these general
steps:
If you use a data area as a control specification, you must create a new
data area in the RPG IV format. Refer to the chapter on control specifications
in IBM Rational Development Studio for i: ILE RPG Reference for more information.
Create a log file, if necessary.
Unless you specify LOGFILE(*NONE),
there must be a log file for the Conversion Aid to access. If you do not have
one, then you can create one by using the CRTDUPOBJ command. For more information,
see The Log File and Using the Log File.
Create the file for the converted source members.
The Conversion Aid
will not create any files. You must create the output file for the converted
source prior to running the CVTRPGSRC command. The recommended name and record
length for the output file is QRPGLESRC and 112 characters respectively. For
additional file information see File Considerations.
Convert your source using the CVTRPGSRC command.
You need
to enter the name of the file and member to be converted. If you accept the
defaults, you will get a converted member in the file QRPGLESRC. The name
of the member will correspond to the name of the unconverted source member.
/COPY members will not be expanded in the converted source member, unless
it is of type RPT or RPT38. A conversion report will be generated.
If your converted source member still has compilation problems, these
are most likely caused because your primary source member contains /COPY compiler
directives. You have two choices to correct this situation:
Reconvert your source member specifying EXPCPY(*YES) to expand copy members
into your converted source member.
Manually correct any remaining errors using the compiler listing as a
guide.