ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/cvtclsrc.htm

227 lines
7.7 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 CL Source (CVTCLSRC)</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="CVTCLSRC.Top_Of_Page"></a>
<h2>Convert CL Source (CVTCLSRC)</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="#CVTCLSRC.PARAMETERS.TABLE">Parameters</a><br>
<a href="#CVTCLSRC.COMMAND.EXAMPLES">Examples</a><br>
<a href="#CVTCLSRC.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="CVTCLSRC"></a>
<p>The Convert CL Source (CVTCLSRC) command is used to convert Control Language (CL) source code from System/38 syntax to the syntax used on the iSeries system. The following are converted:
</p>
<ul>
<li>System/38 <i>object-name.library name</i> to
<ul>
<li><i>library-name/object-name</i>
</li>
</ul>
</li>
<li>System/38 <i>job-name.user-name.job-number</i> to
<ul>
<li><i>job-number/user-name/job-name</i>
</li>
</ul>
</li>
<li>Starting comment delimiters: (/*) to (/* )
</li>
<li>Command names
</li>
<li>Keyword names and values
</li>
<li>Missing required parameters for iSeries commands may need to be added.
</li>
</ul>
<p>Conversion of user-defined commands is limited to the reordering of qualified names and adjusting comment syntax.
</p>
<p>The CVTCLSRC command creates a report indicating the success or failure of the source file conversion. This report is contained in a printer file with the name 'CVTCLSRC'. Successful conversions of System/38 source are noted in the report with the message:
</p>
<p>
<pre>
CPF0786 Member has been converted.
</pre>
</p>
<p>Error messages are printed for unsuccessful conversions. Some examples of functions which cannot be converted and may be printed as error messages in the report are:
</p>
<p>
<pre>
stmt# CPF0785 Command cannot be converted
stmt# CPF0789 Keyword cannot be converted
</pre>
</p>
<p>The user may write a program, perhaps by using the Copy Spooled File (CPYSPLF) command, to process the report based on the success or failure of the conversion.
</p>
<p><b>Restrictions:</b> Library QSYS38 must exist on the system to support the conversions and to detect unsupported functions. Commands with unsupported command name, keyword names, or keyword values are not converted.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#CVTCLSRC.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="CVTCLSRC.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="#CVTCLSRC.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" rowspan="3"><a href="#CVTCLSRC.TOFILE"><b>TOFILE</b></a></td>
<td valign="top">To file</td>
<td valign="top"><i>Qualified object name</i></td>
<td valign="top" rowspan="3">Required, Positional 2</td>
</tr>
<tr>
<td valign="top">Qualifier 1: To 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="#CVTCLSRC.FROMMBR"><b>FROMMBR</b></a></td>
<td valign="top">From member</td>
<td valign="top">Single values: *ALL<br>Other values (up to 50 repetitions): <i>Generic name, name</i></td>
<td valign="top">Required, Positional 3</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#CVTCLSRC.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="CVTCLSRC.FROMFILE"></a>
<h3>From file (FROMFILE)</h3>
<p>Specifies the System/38 CL source file to have its syntax converted.
</p>
<p>This is a required parameter.
</p>
<p><b>Qualifier 2: Library</b>
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>All libraries in the library list for the current thread are searched until the first match is found.
</dd>
</dl>
<dl>
<dt><b>*CURLIB</b></dt>
<dd>The current library for the thread is used to locate the source file. If no library is specified as the current library for the thread, the QGPL library is used.
</dd>
</dl>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the library to be searched.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CVTCLSRC.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CVTCLSRC.TOFILE"></a>
<h3>To file (TOFILE)</h3>
<p>Specifies the file to contain the converted CL source. It must be different than the name specified for the FROMFILE parameter.
</p>
<p>This is a required parameter.
</p>
<p><b>Qualifier 2: Library</b>
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>All libraries in the library list for the current thread are searched until the first match is found.
</dd>
</dl>
<dl>
<dt><b>*CURLIB</b></dt>
<dd>The current library for the thread is used to locate the source file. If no library is specified as the current library for the thread, the QGPL library is used.
</dd>
</dl>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the library to be searched.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CVTCLSRC.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CVTCLSRC.FROMMBR"></a>
<h3>Member (FROMMBR)</h3>
<p>Specifies the members of the file specified for the <b>From file (FROMFILE)</b> parameter that are to be converted.
</p>
<dl>
<dt><b>*ALL</b></dt>
<dd>All members of the specified source file are to be converted.
</dd>
<dt><b><i>generic-name</i></b></dt>
<dd>Specify the generic name of the members to be converted.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the names of the members to be converted. Specify no more than fifty names. Note that the member name of the <i>converted</i> source member is the same as the member name of the unconverted source member in the file specified for the FROMFILE parameter.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CVTCLSRC.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CVTCLSRC.COMMAND.EXAMPLES">Examples</a> </h3>
<p>
<pre>
CVTCLSRC FROMFILE(OLDLIB/FILEA) TOFILE(NEWLIB/FILEB)
FROMMBR(PGM1 PGM2 PGM3)
</pre>
</p>
<p>This command converts three members (PGM1, PGM2, PGM3) of a System/38 source file (FILEA) located in library OLDLIB, to an iSeries source file. The converted source file members are located in FILEB, in library NEWLIB. The converted members keep their original member names, PGM1, PGM2, and PGM3.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#CVTCLSRC.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CVTCLSRC.ERROR.MESSAGES">Error messages</a> </h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>CPF0781</b></dt>
<dd>File &amp;1 in library &amp;2 not a source file.
</dd>
<dt><b>CPF0784</b></dt>
<dd>Specified to-file same as from-file.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CVTCLSRC.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>