497 lines
14 KiB
HTML
497 lines
14 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>Convert Data (QDCXLATE) 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>Convert Data (QDCXLATE) API</h2>
|
||
|
<div class="box" style="width: 80%;">
|
||
|
<br>
|
||
|
Required Parameter Group:<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
<table width="100%">
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top" width="10%">1</td>
|
||
|
<td align="left" valign="top" width="50%">Length of data being converted</td>
|
||
|
<td align="left" valign="top" width="20%">Input</td>
|
||
|
<td align="left" valign="top" width="20%">Packed(5,0)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">2</td>
|
||
|
<td align="left" valign="top">Conversion data</td>
|
||
|
<td align="left" valign="top">I/O</td>
|
||
|
<td align="left" valign="top">Char(*)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">3</td>
|
||
|
<td align="left" valign="top">SBCS conversion table name</td>
|
||
|
<td align="left" valign="top">Input</td>
|
||
|
<td align="left" valign="top">Char(10)</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
Optional Parameter Group:<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
<table width="100%">
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top" width="10%">4</td>
|
||
|
<td align="left" valign="top" width="50%">SBCS conversion table library
|
||
|
name</td>
|
||
|
<td align="left" valign="top" width="20%">Input</td>
|
||
|
<td align="left" valign="top" width="20%">Char(10)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">5</td>
|
||
|
<td align="left" valign="top">Output data</td>
|
||
|
<td align="left" valign="top">Output</td>
|
||
|
<td align="left" valign="top">Char(*)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">6</td>
|
||
|
<td align="left" valign="top">Length of output buffer</td>
|
||
|
<td align="left" valign="top">Input</td>
|
||
|
<td align="left" valign="top">Packed(5,0)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">7</td>
|
||
|
<td align="left" valign="top">Length of converted data</td>
|
||
|
<td align="left" valign="top">Output</td>
|
||
|
<td align="left" valign="top">Packed(5,0)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">8</td>
|
||
|
<td align="left" valign="top">DBCS language</td>
|
||
|
<td align="left" valign="top">Input</td>
|
||
|
<td align="left" valign="top">Char(10)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">9</td>
|
||
|
<td align="left" valign="top">Shift-out and shift-in characters</td>
|
||
|
<td align="left" valign="top">Input</td>
|
||
|
<td align="left" valign="top">Char(1)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">10</td>
|
||
|
<td align="left" valign="top">Type of conversion</td>
|
||
|
<td align="left" valign="top">Input</td>
|
||
|
<td align="left" valign="top">Char(10)</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
Default Public Authority: *USE<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Threadsafe: Yes<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
</div>
|
||
|
|
||
|
<p>The Convert Data (QDCXLATE) API converts data through the use of a table
|
||
|
object. (If you need to convert the case of your data, it is recommended that
|
||
|
you use the <a href="QLGCNVCS.htm">Convert Case</a> (QLGCNVCS, QlgConvertCase
|
||
|
API.) You also can use the equivalent API QTBXLATE to achieve the same
|
||
|
function. The call interface to QTBXLATE is identical to Convert Data
|
||
|
(QDCXLATE).</p>
|
||
|
|
||
|
<p>You can create the conversion table that QDCXLATE uses for the conversion,
|
||
|
or you can use an IBM-supplied table. The IBM-supplied tables can be found in
|
||
|
the QUSRSYS library. For a list of both the conversion tables and the casing
|
||
|
tables, see the <a href="../nls/rbagsglobalmain.htm">Globalization</a> topic in
|
||
|
the iSeries Information Center. These tables are not the same as those used by
|
||
|
the intersystem communications function (ICF) for conversion support. For
|
||
|
information on this, see <a href="../rzab6/rzab6soxoverview.htm">Sockets
|
||
|
Programming</a>.</p>
|
||
|
|
||
|
<p>You can create your own conversion tables using the Create Table (CRTTBL)
|
||
|
command.</p>
|
||
|
|
||
|
<p>When the QDCXLATE API is called with parameters 1, 2, 3, and 4, it converts
|
||
|
single-byte data. When all parameters are specified, DBCS conversion is taking
|
||
|
place.</p>
|
||
|
|
||
|
<p>The QDCXLATE API can distinguish double-byte from single-byte characters
|
||
|
when converting from EBCDIC to ASCII and from ASCII to EBCDIC if the proper
|
||
|
parameters have been supplied. The QDCXLATE API converts data byte for byte and
|
||
|
returns the converted data to your program.</p>
|
||
|
|
||
|
<p>When only single-byte data is converted, the input (unconverted) data is
|
||
|
replaced with the converted data. When double-byte data is converted, the
|
||
|
converted data is placed in the output data parameter.</p>
|
||
|
|
||
|
<p>The QDCXLATE API is thread safe only when converting single-byte data or
|
||
|
T.61 data.</p>
|
||
|
|
||
|
<br>
|
||
|
<h3>Authorities and Locks</h3>
|
||
|
|
||
|
<dl>
|
||
|
<dt><em>Table Authority</em></dt>
|
||
|
|
||
|
<dd>*USE</dd>
|
||
|
|
||
|
<dt><em>Table Library Authority</em></dt>
|
||
|
|
||
|
<dd>*USE</dd>
|
||
|
</dl>
|
||
|
|
||
|
<br>
|
||
|
<h3>Required Parameter Group</h3>
|
||
|
|
||
|
<dl>
|
||
|
<dt><strong>Length of data being converted</strong></dt>
|
||
|
|
||
|
<dd>INPUT; PACKED(5,0)
|
||
|
|
||
|
<p>The length of the data being converted. This value cannot exceed
|
||
|
32 767.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Conversion data</strong></dt>
|
||
|
|
||
|
<dd>I/O; CHAR(*)
|
||
|
|
||
|
<p>The data to be converted. This buffer also contains the output data after
|
||
|
conversion when the API is called with only the required parameter group.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>SBCS conversion table name</strong></dt>
|
||
|
|
||
|
<dd>INPUT; CHAR(10)
|
||
|
|
||
|
<p>The name of the single-byte character set (SBCS) conversion table to be
|
||
|
used. The table may be a system-supplied or user-supplied conversion table. The
|
||
|
table name must be left-justified.</p>
|
||
|
|
||
|
<p><strong>Note:</strong> This parameter is ignored when the DBCS language
|
||
|
parameter is set to *BG5, *KSC, *SCGS *J90X5026, *J90X5035, or *SCGBK.</p>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
<br>
|
||
|
<h3>Optional Parameter Group</h3>
|
||
|
|
||
|
<dl>
|
||
|
<dt><strong>SBCS conversion table library name</strong></dt>
|
||
|
|
||
|
<dd>INPUT; CHAR(10)
|
||
|
|
||
|
<p>The name of the library that contains the SBCS conversion table. The library
|
||
|
name must be left-justified. If this parameter is not specified, the library
|
||
|
list is used to locate the conversion table. This parameter is ignored when the
|
||
|
DBCS language parameter is set to *BG5, *KSC, *SCGS, *J90X5026, *J90X5035 or
|
||
|
*SCGBK.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Output data</strong></dt>
|
||
|
|
||
|
<dd>OUTPUT; CHAR(*)
|
||
|
|
||
|
<p>The output buffer that contains the double-byte character set (DBCS) data
|
||
|
that was converted.</p>
|
||
|
|
||
|
<p>Because of the insertion of shift-out and shift-in characters, it is
|
||
|
possible that the converted data is longer than the source data. If this is the
|
||
|
case, it is not possible to do the conversion in place, as is done when you use
|
||
|
only a required-parameter-group call. The converted data is then placed in the
|
||
|
area pointed to by this parameter.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Length of output buffer</strong></dt>
|
||
|
|
||
|
<dd>INPUT; PACKED(5,0)
|
||
|
|
||
|
<p>The size of the output data buffer. The maximum length should match the
|
||
|
actual size of the output data parameter. If the converted output is longer
|
||
|
than the length of output buffer parameter, an exception is signaled.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Length of converted data</strong></dt>
|
||
|
|
||
|
<dd>OUTPUT; PACKED(5,0)
|
||
|
|
||
|
<p>The actual length of the converted output in the output data parameter.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>DBCS language</strong></dt>
|
||
|
|
||
|
<dd>INPUT; CHAR(10)
|
||
|
|
||
|
<p>The DBCS language that is being converted. All values must be padded on the
|
||
|
right with blanks. The possible values follow:</p>
|
||
|
|
||
|
<table cellpadding="3">
|
||
|
<!-- cols="15 85" -->
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*JPN</em></td>
|
||
|
<td align="left" valign="top">IBM Japanese graphic character set</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*KOR</em></td>
|
||
|
<td align="left" valign="top">IBM Korean graphic character set</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*CHS</em></td>
|
||
|
<td align="left" valign="top">IBM Simplified Chinese graphic character set</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*CHT</em></td>
|
||
|
<td align="left" valign="top">IBM Traditional Chinese graphic character set</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*BG5</em></td>
|
||
|
<td align="left" valign="top">Taiwan industry standard graphic character set (BIG-5)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*KSC</em></td>
|
||
|
<td align="left" valign="top">Korean industry standard graphic character set (KS)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*SCGS</em></td>
|
||
|
<td align="left" valign="top">The People's Republic of China National standard graphic
|
||
|
character set (GB)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*J90X5026</em></td>
|
||
|
<td align="left" valign="top">The Japanese JIS X 0208 1990 standard mapped using CCSID
|
||
|
5026.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*J90X5035</em></td>
|
||
|
<td align="left" valign="top">The Japanese JIS X 0208 1990 standard mapped using CCSID
|
||
|
5035.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*SCGBK</em></td>
|
||
|
<td align="left" valign="top">The People's Republic of China National standard graphic
|
||
|
character set extended (GBK)</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Shift-out and shift-in characters</strong></dt>
|
||
|
|
||
|
<dd>INPUT; CHAR(1)
|
||
|
|
||
|
<p>Whether shift-out and shift-in characters should be inserted during the
|
||
|
conversion. This parameter is ignored when the DBCS language parameter is set
|
||
|
to *BG5, *KSC, *SCGS, *J90X5026, *J90X5035 or *SCGBK. The possible values
|
||
|
follow:</p>
|
||
|
|
||
|
<table cellpadding="3">
|
||
|
<!-- cols="5 95" -->
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>Y</em></td>
|
||
|
<td align="left" valign="top">Insert shift-out and shift-in characters</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>N</em></td>
|
||
|
<td align="left" valign="top">Do not insert shift-out and shift-in characters</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Type of conversion</strong></dt>
|
||
|
|
||
|
<dd>INPUT; CHAR(10)
|
||
|
|
||
|
<p>The type of DBCS conversion being done. The possible values follow:</p>
|
||
|
|
||
|
<table cellpadding="3">
|
||
|
<!-- cols="10 90" -->
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*AE</em></td>
|
||
|
<td align="left" valign="top">Convert ASCII to EBCDIC</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*EA</em></td>
|
||
|
<td align="left" valign="top">Convert EBCDIC to ASCII</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<p><strong>Note:</strong> You are responsible for specifying the correct SBCS
|
||
|
table name for the type of conversion being done by this DBCS request except
|
||
|
when the DBCS language parameter is set to *BG5, *KSC, *SCGS, *J90X5026,
|
||
|
*J90X5035 or *SCGBK.</p>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
<br>
|
||
|
<h3>Error Messages</h3>
|
||
|
|
||
|
<table width="100%" cellpadding="5">
|
||
|
<!-- cols="15 85" -->
|
||
|
<tr>
|
||
|
<th align="left" valign="top" nowrap>Message ID</th>
|
||
|
<th align="left" valign="top">Error Message Text</th>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF2143 E</td>
|
||
|
<td align="left" valign="top">Cannot allocate object &1 in &2 type *&3.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF2144 E</td>
|
||
|
<td align="left" valign="top">Not authorized to &1 in &2 type *&3.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF24B4 E</td>
|
||
|
<td align="left" valign="top">Severe error while addressing parameter list.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF2619 E</td>
|
||
|
<td align="left" valign="top">Table &1 not found.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF264D E</td>
|
||
|
<td align="left" valign="top">Double-byte character set language not valid.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF264E E</td>
|
||
|
<td align="left" valign="top">Shift-in and shift-out value of double-byte character set not
|
||
|
valid.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF264F E</td>
|
||
|
<td align="left" valign="top">Translation type of double-byte character set not valid.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF2647 E</td>
|
||
|
<td align="left" valign="top">Buffer length not valid.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF265E E</td>
|
||
|
<td align="left" valign="top">Number of parameters specified not valid.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF265F E</td>
|
||
|
<td align="left" valign="top">Translation length exceeded maximum length.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF2651 E</td>
|
||
|
<td align="left" valign="top">Table &1 not found.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF2669 E</td>
|
||
|
<td align="left" valign="top">Double-byte character set source not valid.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF269A E</td>
|
||
|
<td align="left" valign="top">Library parameter is not set to
|
||
|
"QSYS " on call.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF269B E</td>
|
||
|
<td align="left" valign="top">T.61 conversion table not found.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF269C E</td>
|
||
|
<td align="left" valign="top">Error in input data.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF269D E</td>
|
||
|
<td align="left" valign="top">A nonspacing underline character was found in the input
|
||
|
data.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF3C90 E</td>
|
||
|
<td align="left" valign="top">Literal value cannot be changed.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF6309 E</td>
|
||
|
<td align="left" valign="top">Not authorized to library &1.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9802 E</td>
|
||
|
<td align="left" valign="top">Not authorized to object &2 in &3.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9872 E</td>
|
||
|
<td align="left" valign="top">Program or service program &1 in library &2 ended.
|
||
|
Reason code &3.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<hr>
|
||
|
API existed prior to V1R3
|
||
|
|
||
|
<hr>
|
||
|
<table align="center" 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></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</body>
|
||
|
</html>
|