ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/QLGCVTTDD.htm

680 lines
18 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">
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
<title>QlgCvtTextDescToDesc()--Convert Text Descriptor API</title>
<!-- Begin Header Records ========================================== -->
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<!-- NETMG2 SCRIPT A converted by B2H R4.1 (346) (CMS) by HOLTJM at -->
<!-- RCHVMW2 on 29 Jan 1999 at 10:01:37 -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!--File Edited December 2001 -->
<!--End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<a name="Top_Of_Page"></a>
<!-- Java sync-link -->
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
</script>
<h2>QlgCvtTextDescToDesc()--Convert Text Descriptor API</h2>
<div class="box" style="width: 60%;">
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Syntax<br>
<br>
<pre>
int QlgCvtTextDescToDesc(int <em>InType</em>,
int <em>OutType</em>,
char <em>*InDescriptor</em>,
int <em>InDescSize</em>,
char <em>*OutDescriptor</em>,
int <em>OutDescSize</em>,
int <em>JobCCSID</em>);
</pre>
<br>
&nbsp;&nbsp;Service Program: QLGUSR<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Yes<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The <strong>QlgCvtTextDescToDesc()</strong> function converts a descriptor of text from one type (CCSID, for example) to another type (IANA name, for example). (IANA is the Internet Assigned Number Authority.)</p>
<p>An example of a use of this support would be to convert an IANA name of ISO-8859-1 to an i5/OS CCSID of 819. For more information see the Usage Notes.</p>
<br>
<h3>Authorities and Locks</h3>
<dl>
<dt><em>API Public Authority</em></dt>
<dd>*USE</dd>
</dl>
<br>
<h3>Parameters</h3>
<dl>
<dt><strong>InType</strong></dt>
<dd>INPUT
<p>Type of descriptor provided.</p>
<table cellpadding="3">
<!-- cols="5 95" -->
<tr>
<td align="left" valign="top"><em>0</em></td>
<td valign="top">CCSID</td>
</tr>
<tr>
<td align="left" valign="top"><em>1</em></td>
<td valign="top">i5/OS supported CCSID</td>
</tr>
<tr>
<td align="left" valign="top"><em>2</em></td>
<td valign="top">short text description</td>
</tr>
<tr>
<td align="left" valign="top"><em>3</em></td>
<td valign="top">AIX 3.1</td>
</tr>
<tr>
<td align="left" valign="top"><em>4</em></td>
<td valign="top">AIX 4.1</td>
</tr>
<tr>
<td align="left" valign="top"><em>5</em></td>
<td valign="top">Windows 3.1</td>
</tr>
<tr>
<td align="left" valign="top"><em>6</em></td>
<td valign="top">Windows 95</td>
</tr>
<tr>
<td align="left" valign="top"><em>7</em></td>
<td valign="top">Windows NT</td>
</tr>
<tr>
<td align="left" valign="top"><em>8</em></td>
<td valign="top">OS/2 Version 3</td>
</tr>
<tr>
<td align="left" valign="top"><em>9</em></td>
<td valign="top">OS/2 Version 4</td>
</tr>
<tr>
<td align="left" valign="top"><em>10</em></td>
<td valign="top">MVS<sup>(TM)</sup> description</td>
</tr>
<tr>
<td align="left" valign="top"><em>11</em></td>
<td valign="top">IANA string </td>
</tr>
<tr>
<td align="left" valign="top"><em>12</em></td>
<td valign="top">Developer Kit for Java </td>
</tr>
<tr>
<td align="left" valign="top"><em>13</em></td>
<td valign="top">iSeries Default Java Encoding</td>
</tr>
</table>
<br>
</dd>
<dt><strong>OutType</strong></dt>
<dd>INPUT
<p>Type of descriptor requested.</p>
<table cellpadding="3">
<!-- cols="5 95" -->
<tr>
<td align="left" valign="top"><em>0</em></td>
<td valign="top">CCSID</td>
</tr>
<tr>
<td align="left" valign="top"><em>1</em></td>
<td valign="top">i5/OS supported CCSID</td>
</tr>
<tr>
<td align="left" valign="top"><em>2</em></td>
<td valign="top">short text description</td>
</tr>
<tr>
<td align="left" valign="top"><em>3</em></td>
<td valign="top">AIX 3.1</td>
</tr>
<tr>
<td align="left" valign="top"><em>4</em></td>
<td valign="top">AIX 4.1</td>
</tr>
<tr>
<td align="left" valign="top"><em>5</em></td>
<td valign="top">Windows 3.1</td>
</tr>
<tr>
<td align="left" valign="top"><em>6</em></td>
<td valign="top">Windows 95</td>
</tr>
<tr>
<td align="left" valign="top"><em>7</em></td>
<td valign="top">Windows NT</td>
</tr>
<tr>
<td align="left" valign="top"><em>8</em></td>
<td valign="top">OS/2 Version 3</td>
</tr>
<tr>
<td align="left" valign="top"><em>9</em></td>
<td valign="top">OS/2 Version 4</td>
</tr>
<tr>
<td align="left" valign="top"><em>10</em></td>
<td valign="top">MVS description</td>
</tr>
<tr>
<td align="left" valign="top"><em>11</em></td>
<td valign="top">IANA string </td>
</tr>
<tr>
<td align="left" valign="top"><em>12</em></td>
<td valign="top">Developer Kit for Java </td>
</tr>
<tr>
<td align="left" valign="top"><em>13</em></td>
<td valign="top">iSeries Default Java Encoding</td>
</tr>
</table>
<br>
</dd>
<dt><strong>InDescriptor</strong></dt>
<dd>INPUT
<p>The input descriptor to be converted.</p>
</dd>
<dt><strong>InDescSize</strong></dt>
<dd>INPUT
<p>The size (in bytes) of the descriptor to be converted.</p>
</dd>
<dt><strong>OutDescriptor</strong></dt>
<dd>OUTPUT
<p>The converted descriptor.</p>
</dd>
<dt><strong>OutDescSize</strong></dt>
<dd>INPUT
<p>The size (in bytes) of the out descriptor area.</p>
</dd>
<dt><strong>JobCCSID</strong></dt>
<dd>INPUT
<p>The CCSID that the <em>InDescriptor</em> and <em>OutDescriptor</em> are encoded in. A value of zero means to use the job's default CCSID.</p>
</dd>
</dl>
<br>
<h3>Return Value</h3>
<dl>
<dt><strong>&gt;0</strong></dt>
<dd><strong>QlgCvtTextDescToDesc</strong> function was successful. The value returned in <em>OutDescriptor</em> is a pointer to a descriptor of the requested type. The value returned is the length (in bytes) of the returned descriptor.</dd>
<dt><strong>&lt;0</strong></dt>
<dd><strong>QlgCvtTextDescToDesc</strong> was not successful.</dd>
</dl>
<br>
<h3>Error Conditions</h3>
<p>If <strong>QlgCvtTextDescToDesc</strong> is not successful, the return value indicates one of the following errors:</p>
<dl>
<dt><strong>-1</strong></dt>
<dd>Qlg_InternalError1<br>
<strong>QlgCvtTextDescToDesc</strong> function detected that an unknown resource failure occurred.<br><br></dd>
<dt><strong>-2</strong></dt>
<dd>Qlg_InternalError2<br>
<strong>QlgCvtTextDescToDesc</strong> function detected that an internal table mismatch occurred.<br><br></dd>
<dt><strong>-3</strong></dt>
<dd>Qlg_BadInType<br>
<strong>QlgCvtTextDescToDesc</strong> function detected that InType value was not recognized.<br><br></dd>
<dt><strong>-4</strong></dt>
<dd>Qlg_BadOutType<br>
<strong>QlgCvtTextDescToDesc</strong> function detected that OutType value was not recognized.<br><br></dd>
<dt><strong>-5</strong></dt>
<dd>Qlg_InTypeEqualsOutType<br>
<strong>QlgCvtTextDescToDesc</strong> function detected that he InType equals the OutType value.<br><br></dd>
<dt><strong>-6</strong></dt>
<dd>Qlg_CCSIDMapError<br>
<strong>QlgCvtTextDescToDesc</strong> function detected that the OutDescriptor will equal the InDescriptor in this case.<br><br></dd>
<dt><strong>-7</strong></dt>
<dd>Qlg_BadCCSIDInDesc<br>
<strong>QlgCvtTextDescToDesc</strong> function detected that the InDescriptor's CCSID is not a valid CCSID number.<br><br></dd>
<dt><strong>-8</strong></dt>
<dd>Qlg_JobCCSIDNotFound<br>
<strong>QlgCvtTextDescToDesc</strong> function detected that the value for JobCCSID is not defined to the system.<br><br></dd>
<dt><strong>-9</strong></dt>
<dd>Qlg_BadJobCCSID<br>
<strong>QlgCvtTextDescToDesc</strong> function detected that the value for JobCCSID is not a valid CCSID number.<br><br></dd>
<dt><strong>-10</strong></dt>
<dd>Qlg_InDescConvertFail<br>
<strong>QlgCvtTextDescToDesc</strong> function detected that the value InDescriptor cannot be converted to CCSID 37.<br><br></dd>
<dt><strong>-11</strong></dt>
<dd>Qlg_InDescriptorNotFound<br>
<strong>QlgCvtTextDescToDesc</strong> function detected that the value for InDescriptor is unknown.<br><br></dd>
<dt><strong>-12</strong></dt>
<dd>Qlg_OutTypeDescNotFound<br>
<strong>QlgCvtTextDescToDesc</strong> function detected that the value for InDescriptor is known, but could not be related to the requested OutDescriptor.<br><br></dd>
<dt><strong>-13</strong></dt>
<dd>Qlg_OutDescSizeTooSmall<br>
<strong>QlgCvtTextDescToDesc</strong> function detected that OutDescSize is too small to hold the requested OutDescriptor.<br><br></dd>
<dt><strong>-14</strong></dt>
<dd>Qlg_OutDescSizeExceedsMax<br>
<strong>QlgCvtTextDescToDesc</strong> function detected that the OutDescriptor exceeds the maximum defined in the header file.</dd>
</dl>
<br>
<h3>Usage Notes</h3>
<p>The following is an example of the kind of information returned by this API for the possible choices. An asterisk (*) indicates that the descriptor is not supported for this CCSID.</p>
<p><strong>Sample Information from the API for CCSID 00037</strong></p>
<table border width="60%">
<tr>
<th align="left" valign="top">Descriptor type</th>
<th align="left" valign="top">String returned</th>
</tr>
<tr>
<td align="left" valign="top" width="50%">CCSID</td>
<td align="left" valign="top" width="50%">00037</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">i5/OS Supported CCSID</td>
<td align="left" valign="top" width="50%">00037</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">short text description</td>
<td align="left" valign="top" width="50%">COM_EUROPE_EBCDIC</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">AIX 3.1</td>
<td align="left" valign="top" width="50%">IBM-037</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">AIX 4.1</td>
<td align="left" valign="top" width="50%">IBM-037</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">Windows 3.1</td>
<td align="left" valign="top" width="50%">CP00037</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">Windows 95</td>
<td align="left" valign="top" width="50%">*</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">Windows NT</td>
<td align="left" valign="top" width="50%">*</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">OS/2 Version 3</td>
<td align="left" valign="top" width="50%">*</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">OS/2 Version 4</td>
<td align="left" valign="top" width="50%">*</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">MVS description</td>
<td align="left" valign="top" width="50%">IBM-037</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">IANA string</td>
<td align="left" valign="top" width="50%">IBM037</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">Developer Kit for Java</td>
<td align="left" valign="top" width="50%">Cp037</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">iSeries Default Java Encoding</td>
<td align="left" valign="top" width="50%">ISO8859_1</td>
</tr>
</table>
<p><strong>Table 2. Sample Information from the API for CCSID 00932</strong></p>
<table border width="60%">
<tr>
<th align="left" valign="top">Descriptor type</th>
<th align="left" valign="top">String returned</th>
</tr>
<tr>
<td align="left" valign="top" width="50%">CCSID</td>
<td align="left" valign="top" width="50%">00932</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">i5/OS Supported CCSID</td>
<td align="left" valign="top" width="50%">00932</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">short text description</td>
<td align="left" valign="top" width="50%">JAPAN_MIX_PC-DATA</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">AIX 3.1</td>
<td align="left" valign="top" width="50%">IBM-932</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">AIX 4.1</td>
<td align="left" valign="top" width="50%">IBM-932</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">Windows 3.1</td>
<td align="left" valign="top" width="50%">*</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">Windows 95</td>
<td align="left" valign="top" width="50%">*</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">Windows NT</td>
<td align="left" valign="top" width="50%">*</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">OS/2 Version 3</td>
<td align="left" valign="top" width="50%">CP00932</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">OS/2 Version 4</td>
<td align="left" valign="top" width="50%">CP00932</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">MVS description</td>
<td align="left" valign="top" width="50%">*</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">IANA string</td>
<td align="left" valign="top" width="50%">*</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">Developer Kit for Java</td>
<td align="left" valign="top" width="50%">*</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">iSeries Default Java Encoding</td>
<td align="left" valign="top" width="50%">SJIS</td>
</tr>
</table>
<p><strong><a name="Table_3">Table 3. Sample Information from the API for CCSID 00437</a></strong></p>
<table border width="60%">
<tr>
<th align="left" valign="top">Descriptor type</th>
<th align="left" valign="top">String returned</th>
</tr>
<tr>
<td align="left" valign="top" width="50%">CCSID</td>
<td align="left" valign="top" width="50%">00437</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">i5/OS Supported CCSID</td>
<td align="left" valign="top" width="50%">00437</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">short text description</td>
<td align="left" valign="top" width="50%">USA_PC-DATA</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">AIX 3.1</td>
<td align="left" valign="top" width="50%">IBM-437</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">AIX 4.1</td>
<td align="left" valign="top" width="50%">IBM-437</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">Windows 3.1</td>
<td align="left" valign="top" width="50%">CP00437</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">Windows 95</td>
<td align="left" valign="top" width="50%">CP00437</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">Windows NT</td>
<td align="left" valign="top" width="50%">CP00437</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">OS/2 Version 3</td>
<td align="left" valign="top" width="50%">CP00437</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">OS/2 Version 4</td>
<td align="left" valign="top" width="50%">CP00437</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">MVS description</td>
<td align="left" valign="top" width="50%">*</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">IANA string</td>
<td align="left" valign="top" width="50%">IBM437</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">Developer Kit for Java</td>
<td align="left" valign="top" width="50%">Cp437</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">iSeries Default Java Encoding</td>
<td align="left" valign="top" width="50%">ISO8859_1</td>
</tr>
</table>
<p><strong><a name="Table_4">Table 4. Sample Information from the API for CCSID 01252</a></strong></p>
<table border width="60%">
<tr>
<th align="left" valign="top">Descriptor type</th>
<th align="left" valign="top">String returned</th>
</tr>
<tr>
<td align="left" valign="top" width="50%">CCSID</td>
<td align="left" valign="top" width="50%">01252</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">i5/OS Supported CCSID</td>
<td align="left" valign="top" width="50%">01252</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">short text description</td>
<td align="left" valign="top" width="50%">MS-WIN_LATIN-1</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">AIX 3.1</td>
<td align="left" valign="top" width="50%">*</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">AIX 4.1</td>
<td align="left" valign="top" width="50%">*</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">Windows 3.1</td>
<td align="left" valign="top" width="50%">CP01252</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">Windows 95</td>
<td align="left" valign="top" width="50%">CP01252</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">Windows NT</td>
<td align="left" valign="top" width="50%">CP01252</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">OS/2 Version 3</td>
<td align="left" valign="top" width="50%">CP01252</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">OS/2 Version 4</td>
<td align="left" valign="top" width="50%">CP01252</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">MVS description</td>
<td align="left" valign="top" width="50%">*</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">IANA string</td>
<td align="left" valign="top" width="50%">Windows-1252</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">Developer Kit for Java</td>
<td align="left" valign="top" width="50%">Cp1252</td>
</tr>
<tr>
<td align="left" valign="top" width="50%">iSeries Default Java Encoding</td>
<td align="left" valign="top" width="50%">ISO8859_1</td>
</tr>
</table>
<br>
<hr>
API introduced: V4R3
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center">
<a href="#Top_Of_Page">Top</a>
| <a href="nls1.htm">National Language Support APIs</a>
| <a href="aplist.htm">APIs by category</a>
</tr>
</table>
</center>
</body>
</html>