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

316 lines
9.8 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!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>Get Related Default CCSID (CDRGRDC, QTQGRDC) 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. -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!-- NETMG2 SCRIPT A converted by B2H R4.1 (346) (CMS) by HOLTJM at -->
<!-- RCHVMW2 on 29 Jan 1999 at 10:01:37 -->
<!--File Edited December 2001 -->
<!-- End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<!-- Java sync-link -->
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
</script>
<a name="Top_Of_Page"></a>
<h2>Get Related Default CCSID (CDRGRDC, QTQGRDC) API</h2>
<div class="box" style="width: 60%;">
<br>
&nbsp;&nbsp;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="40%">CCSID1</td>
<td align="left" valign="top" width="25%">Input</td>
<td align="left" valign="top" width="25%">Int(4)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">ESIN</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Int(4)</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">SEL</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Int(4)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">CCSIDR</td>
<td align="left" valign="top">Output</td>
<td align="left" valign="top">Int(4)</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="left" valign="top">FB</td>
<td align="left" valign="top">Output</td>
<td align="left" valign="top">Feedback</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: No<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>A given CCSID may not be directly usable in many situations. The Get Related
Default CCSID (CDRGRDC, QTQGRDC) API allows the caller to get a nearest equivalent or
best-fit related CCSID. The caller supplies an ES value as an additional key
to select the appropriate related CCSID.</p>
<!-- Please NOTE: DO NOT DELETE THIS SECTION if this API has no authorities and locks. -->
<!-- Instead, use the commented out coding below to indicate NONE. -->
<h3>Authorities and Locks</h3>
<!-- Use this if there are no authorities and locks. -->
<p>None.</p>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>CCSID1</strong></dt>
<dd>INPUT; INT(4)
<p>This variable contains the CCSID value referenced, a positive number in the
range 1 to 65,533.</p>
</dd>
<dt><strong>ESIN</strong></dt>
<dd>INPUT; INT(4)
<p>This variable contains the ES value referenced; a positive number in the
range 4352 to 65,534.</p>
</dd>
<dt><strong>SEL</strong></dt>
<dd>INPUT; INT(4)
<p>This variable is reserved to identify any specific selection criteria as
additional input. For example, to select among two equally valid related
defaults.</p>
<table cellpadding="3">
<!-- cols="10 90" -->
<tr>
<th align="left" valign="top">SEL</th>
<th align="left" valign="top">Meaning</th>
</tr>
<tr>
<td align="left" valign="top"><em>0</em></td>
<td align="left">Installation default</td>
</tr>
</table>
<br>
</dd>
<dt><strong>CCSIDR</strong></dt>
<dd>OUTPUT; INT(4)
<p>This variable contains the returned CCSID value; a positive number in the
range 1 to 65,533. If no related default is found, CCSIDR is set to CCSID1.</p>
</dd>
<dt><strong>FB</strong></dt>
<dd>OUTPUT; FEEDBACK
<p>The function returns, in this feedback array, the processing status (and any
associated reason) for this function the field type is array of three 32-bit
two's complement binary values (12 bytes, or 96 bits); the status code is a
non-negative number in the second 16 bits, and the reason code is a
non-negative number in the second 16 bits. The following are specific meanings
of the status code and associated reason code values (in hexadecimal) contained
in the first 32 bits of FB:</p>
</dd>
</dl>
<br>
<h3>Feedback Codes and Conditions</h3>
<table border width="80%">
<tr>
<th align="center" valign="top">Status</th>
<th align="center" valign="top">Reason</th>
<th align="left" valign="top">Meaning</th>
</tr>
<tr>
<td align="center" valign="top" width="10%">0000</td>
<td align="center" valign="top" width="10%">0000</td>
<td align="left" valign="top" width="80%">The function completed
successfully.</td>
</tr>
<tr>
<td align="center" valign="top">0001</td>
<td align="center" valign="top">0001</td>
<td align="left" valign="top">No entry was found in the Related
Default CCSID Table (RDCT) resource for the CCSID1, ESIN, and SEL combination
specified. CCSID1 value is copied and returned in CCSIDR.</td>
</tr>
<tr>
<td align="center" valign="top">0002</td>
<td align="center" valign="top">0001</td>
<td align="left" valign="top">CCSID1 value is 0, which is reserved
for indicating a default in a hierarchy. It must be resolved before this
function is called.</td>
</tr>
<tr>
<td align="center" valign="top">0003</td>
<td align="center" valign="top">0001</td>
<td align="left" valign="top">CCSID1 is 65,535.</td>
</tr>
<tr>
<td align="center" valign="top">0005</td>
<td align="center" valign="top">0001</td>
<td align="left" valign="top">The value of SEL specified is not
supported.</td>
</tr>
<tr>
<td align="center" valign="top">0006</td>
<td align="center" valign="top">0001</td>
<td align="left" valign="top">The RDCT resource was not found.</td>
</tr>
<tr>
<td align="center" valign="top">0006</td>
<td align="center" valign="top">0002</td>
<td align="left" valign="top">The RDCT resource is currently
unavailable.</td>
</tr>
<tr>
<td align="center" valign="top">0007</td>
<td align="center" valign="top">0001</td>
<td align="left" valign="top">The system RDCT resource accessed by
the function is found to be incorrect in the structure.</td>
</tr>
<tr>
<td align="center" valign="top">0008</td>
<td align="center" valign="top">0001</td>
<td align="left" valign="top">CCSID1 value is not in the range 0 to
65,635.</td>
</tr>
<tr>
<td align="center" valign="top">0008</td>
<td align="center" valign="top">0002</td>
<td align="left" valign="top">ESIN value is not in the range 4352
to 65,534. The CCSID1 value is copied and returned in CCSIDR.</td>
</tr>
<tr>
<td align="center" valign="top">0008</td>
<td align="center" valign="top">000B</td>
<td align="left" valign="top">SEL value is not in the range 0 to
255.</td>
</tr>
</table>
<br>
<br>
<h3>Usage Notes</h3>
<ol>
<li>CCSID is not locally supported:
<p>A given CCSID is not one of the supported CCSIDs in that environment. For
example, an iSeries server supporting only EBCDIC CCSIDs may be serving a PC
user, where all the data generated is in one of the PC CCSIDs. A DB2 UDB for
iSeries database server receiving the SQL statement CREATE TABLE from the PC
user may not be able to create a table in any other CCSID than an EBCDIC CCSID
supported in that installation. Before the table creation is completed, a CCSID
value is needed to identify the table's CCSID. Any data from the PC that is
placed in this table is converted to this CCSID. However, a selection from the
locally supported CCSIDs of a single CCSID that can preserve the maximum number
of PC graphic characters is needed. If the user does not supply this CCSID, the
system defaults to a CCSID.</p>
<p>This function gets a CCSID that is predetermined to be the best fit. An ES
value is supplied as a key to identify the local environment's needs or
characteristic.</p>
</li>
<li>CCSID to match a specific data type is needed:
<p>In a situation where a given CCSID is incompatible with the data type (for
example, SBCS CCSID and graphic data type), and a group of CCSIDs (one for each
of SBCS, DBCS, and mixed SB/DB encoding schemes) are used, it is necessary to
pick the correct CCSID that matches the data type.</p>
<p>Most CCSIDs registered to date have only one CCSID per data type and ES
match. Such CCSIDs share one or more CS and CP values among them, and differ
only on the ES ID values. However, since some CS and CP values can be shared
between different CCSIDs (with the same ES), more than one CCSID can qualify to
be used.</p>
<p>For example, the CS, CP (00370, 00300) of DBCS Japanese Host CCSID 00300 is
used in CCSID 05026 (with SBCS Katakana Extended CS 01172, CP 00290) and in
CCSID 05035 (with SBCS Latin Extended CS 01172 and CP 01027). If only DBCS
CCSID 00300 was specified, both the CCSIDs 05026 and 05035 qualify to be a
related mixed CCSID. Also, both the SBCS CCSIDs 00290 and 01027 qualify to be
the related SBCS CCSID.</p>
<p>However, a single default value selected from the multiple possible CCSIDs
is predetermined and made available as a <strong><em>related
default</em></strong> CCSID. This function gets this predetermined default for
the caller-supplied CCSID value. The defaults are arranged with ES as the key
to properly match the data type needed by the caller.</p>
</li>
</ol>
<hr>
API introduced: V2R2
<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></td>
</tr>
</table>
</center>
</body>
</html>