365 lines
15 KiB
HTML
365 lines
15 KiB
HTML
|
|
||
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
|
<html>
|
||
|
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
<title>Convert RPG Source (CVTRPGSRC)</title>
|
||
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</head>
|
||
|
<body bgcolor="white">
|
||
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<a name="CVTRPGSRC.Top_Of_Page"></a>
|
||
|
<h2>Convert RPG Source (CVTRPGSRC)</h2>
|
||
|
<table width="100%">
|
||
|
<tr>
|
||
|
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
|
||
|
<b>Threadsafe: </b>No
|
||
|
</td>
|
||
|
<td valign="top" align="right">
|
||
|
<a href="#CVTRPGSRC.PARAMETERS.TABLE">Parameters</a><br>
|
||
|
<a href="#CVTRPGSRC.COMMAND.EXAMPLES">Examples</a><br>
|
||
|
<a href="#CVTRPGSRC.ERROR.MESSAGES">Error messages</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<div> <a name="CVTRPGSRC"></a>
|
||
|
<h3>Convert RPG Source</h3>
|
||
|
<p>The Convert RPG Source (CVTRPGSRC) command converts RPG III or RPG/400 source code to ILE RPG source code.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CVTRPGSRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
|
||
|
<div>
|
||
|
<h3><a name="CVTRPGSRC.PARAMETERS.TABLE">Parameters</a></h3>
|
||
|
<table border="1" cellpadding="4" cellspacing="0">
|
||
|
<!-- col1="10" col2="15" col3="30" col4="10" -->
|
||
|
<tr>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top" rowspan="3"><a href="#CVTRPGSRC.FROMFILE"><b>FROMFILE</b></a></td>
|
||
|
<td valign="top">From file</td>
|
||
|
<td valign="top"><i>Qualified object name</i></td>
|
||
|
<td valign="top" rowspan="3">Required, Positional 1</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top">Qualifier 1: From file</td>
|
||
|
<td valign="top"><i>Name</i></td>
|
||
|
</tr><tr>
|
||
|
<td valign="top">Qualifier 2: Library</td>
|
||
|
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
|
||
|
</tr><tr>
|
||
|
<td valign="top"><a href="#CVTRPGSRC.FROMMBR"><b>FROMMBR</b></a></td>
|
||
|
<td valign="top">From member</td>
|
||
|
<td valign="top"><i>Generic name, name</i>, *ALL</td>
|
||
|
<td valign="top">Required, Positional 2</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top" rowspan="3"><a href="#CVTRPGSRC.TOFILE"><b>TOFILE</b></a></td>
|
||
|
<td valign="top">To file</td>
|
||
|
<td valign="top">Single values: *NONE<br>Other values: <i>Qualified object name</i></td>
|
||
|
<td valign="top" rowspan="3">Optional, Positional 3</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top">Qualifier 1: To file</td>
|
||
|
<td valign="top"><i>Name</i>, <b><u>QRPGLESRC</u></b></td>
|
||
|
</tr><tr>
|
||
|
<td valign="top">Qualifier 2: Library</td>
|
||
|
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
|
||
|
</tr><tr>
|
||
|
<td valign="top"><a href="#CVTRPGSRC.TOMBR"><b>TOMBR</b></a></td>
|
||
|
<td valign="top">To member</td>
|
||
|
<td valign="top"><i>Name</i>, <b><u>*FROMMBR</u></b></td>
|
||
|
<td valign="top">Optional, Positional 4</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CVTRPGSRC.EXPCPY"><b>EXPCPY</b></a></td>
|
||
|
<td valign="top">Expand copy member</td>
|
||
|
<td valign="top"><b><u>*NO</u></b>, *YES</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CVTRPGSRC.CVTRPT"><b>CVTRPT</b></a></td>
|
||
|
<td valign="top">Print conversion report</td>
|
||
|
<td valign="top"><b><u>*YES</u></b>, *NO</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CVTRPGSRC.SECLVL"><b>SECLVL</b></a></td>
|
||
|
<td valign="top">Include second level text</td>
|
||
|
<td valign="top"><b><u>*NO</u></b>, *YES</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CVTRPGSRC.INSRTPL"><b>INSRTPL</b></a></td>
|
||
|
<td valign="top">Insert specification template</td>
|
||
|
<td valign="top"><b><u>*NO</u></b>, *YES</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top" rowspan="3"><a href="#CVTRPGSRC.LOGFILE"><b>LOGFILE</b></a></td>
|
||
|
<td valign="top">Log file</td>
|
||
|
<td valign="top">Single values: *NONE<br>Other values: <i>Qualified object name</i></td>
|
||
|
<td valign="top" rowspan="3">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top">Qualifier 1: Log file</td>
|
||
|
<td valign="top"><i>Name</i>, <b><u>QRNCVTLG</u></b></td>
|
||
|
</tr><tr>
|
||
|
<td valign="top">Qualifier 2: Library</td>
|
||
|
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
|
||
|
</tr><tr>
|
||
|
<td valign="top"><a href="#CVTRPGSRC.LOGMBR"><b>LOGMBR</b></a></td>
|
||
|
<td valign="top">Log file member</td>
|
||
|
<td valign="top"><i>Name</i>, <b><u>*FIRST</u></b>, *LAST</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CVTRPGSRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div> <a name="CVTRPGSRC.FROMFILE"></a>
|
||
|
<h3>From file (FROMFILE)</h3>
|
||
|
<p>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.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><i>source-file-name</i></b></dt>
|
||
|
<dd>Enter the name of the source file that contains the source member(s) to be converted.
|
||
|
</dd>
|
||
|
<dt><b><u>*LIBL</u></b></dt>
|
||
|
<dd>The system searches the library list to find the library where the source file is stored.
|
||
|
</dd>
|
||
|
<dt><b>*CURLIB</b></dt>
|
||
|
<dd>The current library is used to find the source file. If you have not specified a current library, then the library QGPL is used.
|
||
|
</dd>
|
||
|
<dt><b><i>library-name</i></b></dt>
|
||
|
<dd>Enter the name of the library where the source file is stored.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CVTRPGSRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CVTRPGSRC.FROMMBR"></a>
|
||
|
<h3>From member (FROMMBR)</h3>
|
||
|
<p>Specifies the name(s) of the source member(s) to be converted. This is a required parameter; there is no default member name.
|
||
|
</p>
|
||
|
<p>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).
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><i>source-file-member-name</i></b></dt>
|
||
|
<dd>Enter the name of the source member to be converted.
|
||
|
</dd>
|
||
|
<dt><b>*ALL</b></dt>
|
||
|
<dd>The command converts all the members in the source file specified.
|
||
|
</dd>
|
||
|
<dt><b><i>generic*-source-file-member-name</i></b></dt>
|
||
|
<dd>Enter the generic name of members having the same prefix in their names followed by a '*' (asterisk). The command converts all the members having the generic name in the source file specified. For example, specifying FROMMBR(PR*) will result in the conversion of all members whose names begin with 'PR'.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CVTRPGSRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CVTRPGSRC.TOFILE"></a>
|
||
|
<h3>To file (TOFILE)</h3>
|
||
|
<p>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.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>QRPGLESRC</u></b></dt>
|
||
|
<dd>The default source file QRPGLESRC contains the converted source member(s).
|
||
|
</dd>
|
||
|
<dt><b>*NONE</b></dt>
|
||
|
<dd>No converted source member is generated. The TOMBR parameter value is ignored. CVTRPT(*YES) must also be specified or the conversion will end immediately.
|
||
|
<p>This feature allows you to find some potential problems without having to create the converted source member.
|
||
|
</p>
|
||
|
</dd>
|
||
|
<dt><b><i>source-file-name</i></b></dt>
|
||
|
<dd>Enter the name of the converted source file that contains the converted source member(s).
|
||
|
<p>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.
|
||
|
</p>
|
||
|
</dd>
|
||
|
<dt><b><u>*LIBL</u></b></dt>
|
||
|
<dd>The system searches the library list to find the library where the converted source file is stored.
|
||
|
</dd>
|
||
|
<dt><b>*CURLIB</b></dt>
|
||
|
<dd>The current library is used to find the converted source file. If you have not specified a current library then the library QGPL is used.
|
||
|
</dd>
|
||
|
<dt><b><i>library-name</i></b></dt>
|
||
|
<dd>Enter the name of the library where the converted source file is stored.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CVTRPGSRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CVTRPGSRC.TOMBR"></a>
|
||
|
<h3>To member (TOMBR)</h3>
|
||
|
<p>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.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*FROMMBR</u></b></dt>
|
||
|
<dd>The member name specified in the FROMMBR parameter is used as the converted source member name. If FROMMBR(*ALL) is specified, then all the source members in the FROMFILE are converted. The converted source members have the same names as those of the original source members. If a generic name is specified in the FROMMBR parameter, then all the source members specified having the same prefix in their names are converted. The converted source members have the same names as those of the original generic source members.
|
||
|
</dd>
|
||
|
<dt><b><i>source-file-member-name</i></b></dt>
|
||
|
<dd>Enter the name of the converted source member. If the member does not exist, it will be created.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CVTRPGSRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CVTRPGSRC.EXPCPY"></a>
|
||
|
<h3>Expand copy member (EXPCPY)</h3>
|
||
|
<p>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.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*NO</u></b></dt>
|
||
|
<dd>Do not expand the /COPY file member(s) into the converted source. This is the default.
|
||
|
</dd>
|
||
|
<dt><b>*YES</b></dt>
|
||
|
<dd>Expand the /COPY file member(s) into the converted source.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<p>
|
||
|
<b>Note: </b>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.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CVTRPGSRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CVTRPGSRC.CVTRPT"></a>
|
||
|
<h3>Print conversion report (CVTRPT)</h3>
|
||
|
<p>Specifies whether or not a conversion report is printed.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*YES</u></b></dt>
|
||
|
<dd>The conversion report is printed. This is the default.
|
||
|
</dd>
|
||
|
<dt><b>*NO</b></dt>
|
||
|
<dd>The conversion report is not printed.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CVTRPGSRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CVTRPGSRC.SECLVL"></a>
|
||
|
<h3>Include second level text (SECLVL)</h3>
|
||
|
<p>Specifies whether second-level text is printed in the conversion report.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*NO</u></b></dt>
|
||
|
<dd>Second-level message text is not printed in the conversion report. This is the default.
|
||
|
</dd>
|
||
|
<dt><b>*YES</b></dt>
|
||
|
<dd>Second-level message text is printed in the conversion report.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CVTRPGSRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CVTRPGSRC.INSRTPL"></a>
|
||
|
<h3>Insert specification template (INSRTPL)</h3>
|
||
|
<p>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).
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*NO</u></b></dt>
|
||
|
<dd>A specification template is not inserted in the converted source member. This is the default.
|
||
|
</dd>
|
||
|
<dt><b>*YES</b></dt>
|
||
|
<dd>A specification template is inserted in the converted source member. Each specification template is inserted at the beginning of the appropriate specification section.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CVTRPGSRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CVTRPGSRC.LOGFILE"></a>
|
||
|
<h3>Log file (LOGFILE)</h3>
|
||
|
<p>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.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>QRNCVTLG</u></b></dt>
|
||
|
<dd>The default log file QRNCVTLG is used to contain the conversion information.
|
||
|
</dd>
|
||
|
<dt><b>*NONE</b></dt>
|
||
|
<dd>Conversion information is not written to a log file.
|
||
|
</dd>
|
||
|
<dt><b><i>log-file-name</i></b></dt>
|
||
|
<dd>Enter the name of the log file that is to be used to track the conversion information.
|
||
|
</dd>
|
||
|
<dt><b><u>*LIBL</u></b></dt>
|
||
|
<dd>The system searches the library list to find the library where the log file is stored.
|
||
|
</dd>
|
||
|
<dt><b><i>library-name</i></b></dt>
|
||
|
<dd>Enter the name of the library where the log file is stored.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CVTRPGSRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CVTRPGSRC.LOGMBR"></a>
|
||
|
<h3>Log file member (LOGMBR)</h3>
|
||
|
<p>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.
|
||
|
</p>
|
||
|
<p>If the log file contains no members, then a member having the same name as the log file is created.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*FIRST</u></b></dt>
|
||
|
<dd>The command uses the first member in the specified log file. This is the default.
|
||
|
</dd>
|
||
|
<dt><b>*LAST</b></dt>
|
||
|
<dd>The command uses the last member in the specified log file.
|
||
|
</dd>
|
||
|
<dt><b><i>log-file-member-name</i></b></dt>
|
||
|
<dd>Enter the name of the file member used to track conversion information.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CVTRPGSRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div><h3><a name="CVTRPGSRC.COMMAND.EXAMPLES">Examples</a> </h3>
|
||
|
<p><b>Example 1: Converting RPG III Source to RPG IV Source </b>
|
||
|
</p>
|
||
|
<p>
|
||
|
<pre>
|
||
|
CVTRPGSRC FROMFILE(MYLIB/QRPGSRC) FROMMBR(XMPLE1)
|
||
|
TOFILE(MYLIB/QRPGLESRC) TOMBR(*FROMMBR)
|
||
|
EXPCPY(*NO)
|
||
|
CVTRPT(*YES) LOGFILE(MYLIB/QRNCVTLG)
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>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.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CVTRPGSRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div><h3><a name="CVTRPGSRC.ERROR.MESSAGES">Error messages</a> </h3>
|
||
|
<p><b><u>*ESCAPE Messages</u></b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b>RNS9350</b></dt>
|
||
|
<dd>Conversion terminated.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CVTRPGSRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</body>
|
||
|
</html>
|