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

516 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>Retrieve Language Information (QLGRLNGI) 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>Retrieve Language Information (QLGRLNGI) API</h2>
<div class="box" style="width: 70%;">
<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="50%">Receiver variable</td>
<td align="left" valign="top" width="20%">Output</td>
<td align="left" valign="top" width="20%">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Length of receiver variable</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">Language selection information format name</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(8)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Language selection information</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="left" valign="top">Output format name</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(8)</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="left" valign="top">Error code</td>
<td align="left" valign="top">I/O</td>
<td align="left" valign="top">Char(*)</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: No<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Retrieve Language Information (QLGRLNGI) API returns a selected national language version (NLV) based on the specified product, option, and language identifier. This API can be used to determine the correct NLV directory to be used to locate translatable information.</p>
<p><strong>Note:</strong> The format LNGR0100 returns CCSID information about an NLV. These values are the CCSIDs that are used when language translation is done for a given NLV, but do not imply whether or not a particular product or portion of a product has actually been translated. If runtime conversions are to be done on translatable data, they should be based on how the specific data is tagged.</p>
<br>
<h3>Authorities and Locks</h3>
<dl>
<dt><em>Product Availability Lock</em></dt>
<dd>*SHRRD
<p>The product availability object resides in the QUSRSYS library.</p></dd>
</dl>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>Receiver variable</strong></dt>
<dd>OUTPUT; CHAR(*)
<p>The variable to receive the requested information.</p></dd>
<dt><strong>Length of receiver variable</strong></dt>
<dd>INPUT; BINARY(4)
<p>The length of the receiver variable in bytes. The value specified must be at least 8.</p></dd>
<dt><strong>Language selection information format name</strong></dt>
<dd>INPUT; CHAR(8)
<p>The content and format of the detailed input specification. The possible format names are:</p>
<table cellpadding="3">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>LNGI0100</em></td>
<td valign="top">Specifies basic information about which product and option to return information for and the language ID to use. For more information, see <a href="#HDRLNGI100">LNGI0100 Format</a>.</td>
</tr>
<tr>
<td align="left" valign="top"><em>LNGI0110</em></td>
<td valign="top">Specifies basic information about which product and option to return information for and the language ID to use. This format will return the same information as format LNGI0100, but message CPF3BEE will not be issued if the primary language is not installed. For more information, see <a href="#HDRLNGI110">LNGI0110 Format</a>.</td>
</tr>
</table>
<br>
</dd>
<dt><strong>Language selection information</strong></dt>
<dd>INPUT; CHAR(*)
<p>The detailed input specification information for this request.</p></dd>
<dt><strong>Output format name</strong></dt>
<dd>INPUT; CHAR(8)
<p>The content and format of the information returned. The possible format names are:</p>
<table cellpadding="3">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>LNGR0100</em></td>
<td valign="top">Returns basic information about the national language version (NLV) that best matches the specified product, option, and language ID. For more information, see <a href="#HDRLNGR100">LNGR0100 Format</a>.</td>
</tr>
<tr>
<td align="left" valign="top"><em>LNGR0200</em></td>
<td valign="top">Returns basic information about the national language version (NLV) that best matches the specified product, option, and language ID. It also returns information about the coded character set identifiers (CCSIDs) that are used to store the NLV information. For more information, see <a href="#HDRLNGR200">LNGR0200 Format</a>.</td>
</tr>
</table>
<br>
</dd>
<dt><strong>Error code</strong></dt>
<dd>I/O; CHAR(*)
<p>The structure in which to return error information. For the format of the structure, see <a href="../apiref/error.htm#hdrerrcod">Error Code Parameter</a>.</p></dd>
</dl>
<br>
<h3><a name="HDRLNGI100">LNGI0100 Format</a></h3>
<p>Information passed in the language selection information parameter can be in the following format. For detailed descriptions of each field, see <a href="#HDRLNGIFD">Field Descriptions</a>.</p>
<table border width="80%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Field</th>
</tr>
<tr>
<th valign="bottom" align="center">Dec</th>
<th valign="bottom" align="center">Hex</th>
</tr>
<tr>
<td align="center" valign="TOP" width="10%">0</td>
<td align="center" valign="TOP" width="10%">0</td>
<td align="left" valign="top" width="20%">CHAR(7)</td>
<td align="left" valign="top" width="60%">Product ID</td>
</tr>
<tr>
<td align="center" valign="TOP" width="10%">13</td>
<td align="center" valign="TOP" width="10%">D</td>
<td align="left" valign="top" width="20%">CHAR(4)</td>
<td align="left" valign="top" width="60%">Product option</td>
</tr>
<tr>
<td align="center" valign="TOP" width="10%">17</td>
<td align="center" valign="TOP" width="10%">11</td>
<td align="left" valign="top" width="20%">CHAR(10)</td>
<td align="left" valign="top" width="60%">Language ID</td>
</tr>
</table>
<br><br>
<h3><a name="HDRLNGI110">LNGI0110 Format</a></h3>
<p>Information passed in the language selection information parameter can be in the following format. For detailed descriptions of each field, see <a href="#HDRLNGIFD">Field Descriptions</a>.</p>
<table border width="80%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Field</th>
</tr>
<tr>
<th valign="bottom" align="center">Dec</th>
<th valign="bottom" align="center">Hex</th>
</tr>
<tr>
<td align="center" valign="TOP" width="10%">0</td>
<td align="center" valign="TOP" width="10%">0</td>
<td align="left" valign="top" width="20%">CHAR(7)</td>
<td align="left" valign="top" width="60%">Product ID</td>
</tr>
<tr>
<td align="center" valign="TOP" width="10%">13</td>
<td align="center" valign="TOP" width="10%">D</td>
<td align="left" valign="top" width="20%">CHAR(4)</td>
<td align="left" valign="top" width="60%">Product option</td>
</tr>
<tr>
<td align="center" valign="TOP" width="10%">17</td>
<td align="center" valign="TOP" width="10%">11</td>
<td align="left" valign="top" width="20%">CHAR(10)</td>
<td align="left" valign="top" width="60%">Language ID</td>
</tr>
</table>
<br><br>
<h3><a name="HDRLNGIFD">Field Descriptions</a></h3>
<p><strong>Product ID.</strong> The product ID for which information is being requested. You can use this special value for the product ID:</p>
<table cellpadding="3">
<!-- cols="10 90" -->
<tr>
<td align="left" valign="top"><em>*OPSYS</em></td>
<td valign="top">The product ID for the operating system for the current release.</td>
</tr>
</table>
<p><strong>Product option.</strong> The option number for which information is being requested. Use 0000 for the base option. Valid values are 0000 through 0099, where each character is a digit.</p>
<p><strong>Language ID.</strong> The 3-character language ID that should be used to locate the correct NLV. Valid values can be found by prompting the Create User Profile (CRTUSRPRF) command and looking at the LANGID parameter. You can use these special values:</p>
<table cellpadding="3">
<!-- cols="10 90" -->
<tr>
<td align="left" valign="top"><em>*CURUSR</em></td>
<td valign="top">Extract the language ID from the user profile that is currently in effect for the requesting job.</td>
</tr>
<tr>
<td align="left" valign="top"><em>*SYSVAL</em></td>
<td valign="top">Extract the language ID from the QLANGID system value.</td>
</tr>
</table>
<br><br>
<h3>Format of the Returned Information</h3>
<p>Information that is returned in the receiver variable parameter can be in the following format. For detailed descriptions of the fields for each format, see <a href="#HDRLNGRFD">Field Descriptions</a>.</p>
<p>If the product load is not known to the system, an error (CPF0CAF) will occur. If the product load is known to the system, but the specified product option is not installed, an error (CPF3BDF) will occur. If the product and option are known and installed, but there is no primary language installed for it, an error (CPF3BEE) will occur.</p>
<p><strong><a name="HDRLNGR100">LNGR0100 Format</a></strong></p>
<table border width="80%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Field</th>
</tr>
<tr>
<th valign="bottom" align="center">Dec</th>
<th valign="bottom" align="center">Hex</th>
</tr>
<tr>
<td align="center" valign="TOP" width="10%">0</td>
<td align="center" valign="TOP" width="10%">0</td>
<td align="left" valign="top" width="20%">BINARY(4)</td>
<td align="left" valign="top" width="60%">Bytes returned</td>
</tr>
<tr>
<td align="center" valign="TOP" width="10%">4</td>
<td align="center" valign="TOP" width="10%">4</td>
<td align="left" valign="top" width="20%">BINARY(4)</td>
<td align="left" valign="top" width="60%">Bytes available</td>
</tr>
<tr>
<td align="center" valign="TOP" width="10%">8</td>
<td align="center" valign="TOP" width="10%">8</td>
<td align="left" valign="top" width="20%">CHAR(4)</td>
<td align="left" valign="top" width="60%">Selected NLV</td>
</tr>
<tr>
<td align="center" valign="TOP" width="10%">12</td>
<td align="center" valign="TOP" width="10%">C</td>
<td align="left" valign="top" width="20%">CHAR(4)</td>
<td align="left" valign="top" width="60%">NLV of primary language</td>
</tr>
<tr>
<td align="center" valign="TOP" width="10%">16</td>
<td align="center" valign="TOP" width="10%">10</td>
<td align="left" valign="top" width="20%">CHAR(3)</td>
<td align="left" valign="top" width="60%">Language ID</td>
</tr>
</table>
<br>
<p><strong><a name="HDRLNGR200">LNGR0200 Format</a></strong></p>
<table border width="80%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Field</th>
</tr>
<tr>
<th valign="bottom" align="center">Dec</th>
<th valign="bottom" align="center">Hex</th>
</tr>
<tr>
<td align="center" valign="TOP" width="10%">0</td>
<td align="center" valign="TOP" width="10%">0</td>
<td align="left" valign="top" width="20%">BINARY(4)</td>
<td align="left" valign="top" width="60%">Bytes returned</td>
</tr>
<tr>
<td align="center" valign="TOP" width="10%">4</td>
<td align="center" valign="TOP" width="10%">4</td>
<td align="left" valign="top" width="20%">BINARY(4)</td>
<td align="left" valign="top" width="60%">Bytes available</td>
</tr>
<tr>
<td align="center" valign="TOP" width="10%">8</td>
<td align="center" valign="TOP" width="10%">8</td>
<td align="left" valign="top" width="20%">CHAR(4)</td>
<td align="left" valign="top" width="60%">Selected NLV</td>
</tr>
<tr>
<td align="center" valign="TOP" width="10%">12</td>
<td align="center" valign="TOP" width="10%">C</td>
<td align="left" valign="top" width="20%">CHAR(4)</td>
<td align="left" valign="top" width="60%">NLV of primary language</td>
</tr>
<tr>
<td align="center" valign="TOP" width="10%">16</td>
<td align="center" valign="TOP" width="10%">10</td>
<td align="left" valign="top" width="20%">BINARY(4)</td>
<td align="left" valign="top" width="60%">EBCDIC CCSID of selected NLV</td>
</tr>
<tr>
<td align="center" valign="TOP" width="10%">20</td>
<td align="center" valign="TOP" width="10%">14</td>
<td align="left" valign="top" width="20%">BINARY(4)</td>
<td align="left" valign="top" width="60%">PC ASCII CCSID of selected NLV</td>
</tr>
<tr>
<td align="center" valign="TOP" width="10%">24</td>
<td align="center" valign="TOP" width="10%">18</td>
<td align="left" valign="top" width="20%">BINARY(4)</td>
<td align="left" valign="top" width="60%">ISO ASCII CCSID of selected NLV</td>
</tr>
<tr>
<td align="center" valign="TOP" width="10%">28</td>
<td align="center" valign="TOP" width="10%">1C</td>
<td align="left" valign="top" width="20%">CHAR(3)</td>
<td align="left" valign="top" width="60%">Language ID</td>
</tr>
</table>
<br><br>
<h3><a name="HDRLNGRFD">Field Descriptions</a></h3>
<p><strong>Bytes available.</strong> The number of bytes of data available to be returned to the user.</p>
<p><strong>Bytes returned.</strong> The number of bytes returned to the user. This is the lesser of the number of bytes available and the length of the receiver variable.</p>
<p><strong>EBCDIC CCSID of selected NLV.</strong> The CCSID that is used to store translated, EBCDIC textual data for the selected NLV.</p>
<p><strong>ISO ASCII CCSID of selected NLV.</strong> The CCSID that is used to store translated, Internet-ASCII textual data for the selected NLV.</p>
<p><strong>Language ID.</strong> The language identifier that is used in the determination of NLV. This will either be the specified value, the value from the current user profile, or the value from the QLANGID system value.</p>
<p><strong>NLV of primary language.</strong> The NLV that is associated with the primary language installed for the specified product and option. If language selection information format LNGI0110 is specified, this field may contain blanks.</p>
<p><strong>PC ASCII CCSID of selected NLV.</strong> The CCSID that is used to store translated, PC-ASCII textual data for the selected NLV.</p>
<p><strong>Selected NLV.</strong> The NLV chosen as a result of the specified or determined language ID, and what NLVs are installed for the specified product and option. This will be the same as the NLV of the primary language if the language ID maps to an NLV that is not installed for the product.</p>
<br>
<h3>Error Messages</h3>
<table width="100%" cellpadding="3">
<!-- cols="15 85" -->
<tr>
<th align="left" valign="top">Message ID</th>
<th align="left" valign="top">Error Message Text</th>
</tr>
<tr>
<td align="left" valign="top">CPF0C4A E</td>
<td valign="top">Product record not found.</td>
</tr>
<tr>
<td align="left" valign="top">CPF0C4B E</td>
<td valign="top">Product availability object &amp;2/&amp;1 recovery required.</td>
</tr>
<tr>
<td align="left" valign="top">CPF0C4C E</td>
<td valign="top">Cannot allocate object &amp;1 in library &amp;2.</td>
</tr>
<tr>
<td align="left" valign="top">CPF0C4D E</td>
<td valign="top">Error occurred while processing object &amp;1 in library &amp;2.</td>
</tr>
<tr>
<td align="left" valign="top">CPF24B4 E</td>
<td valign="top">Severe error while addressing parameter list.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3BEE E</td>
<td valign="top">Primary language not installed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3BDF E</td>
<td valign="top">CCSID Product not installed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C19 E</td>
<td valign="top">Error occurred with receiver variable specified.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C21 E</td>
<td valign="top">Format name &amp;1 is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C24 E</td>
<td valign="top">Length of the receiver variable is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C90 E</td>
<td valign="top">Literal value cannot be changed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3CF1 E</td>
<td valign="top">Error code parameter not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9872 E</td>
<td valign="top">Program or service program &amp;1 in library &amp;2 ended. Reason code &amp;3.</td>
</tr>
</table>
<br>
<hr>
API introduced: V4R1
<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>