525 lines
16 KiB
HTML
525 lines
16 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>Aid Spelling (QTWAIDSP) 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 October 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>Aid Spelling (QTWAIDSP) API</h2>
|
|
|
|
<div class="box" style="width: 75%;">
|
|
<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%">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">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">Input word</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">Length of input word</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Binary(4)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">6</td>
|
|
<td align="left" valign="top">Input dictionaries</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Char(*)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">7</td>
|
|
<td align="left" valign="top">Length of input dictionaries</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Binary(4)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">8</td>
|
|
<td align="left" valign="top">Output dictionaries</td>
|
|
<td align="left" valign="top">Output</td>
|
|
<td align="left" valign="top">Char(*)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">9</td>
|
|
<td align="left" valign="top">Length of output dictionaries</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Binary(4)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">10</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>
|
|
Default Public Authority: *USE<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Threadsafe: No<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
</div>
|
|
|
|
<p>The Aid Spelling (QTWAIDSP) API returns a list of candidate words that are similar in spelling to the input word. The input word is generally the misspelled word and the candidate words are correctly spelled words that are spelled similarly to the input word. The QTWAIDSP API returns a maximum of six candidate words per dictionary.</p>
|
|
|
|
<p>The QTWAIDSP API can be used to do the following:</p>
|
|
|
|
<ul>
|
|
<li>Return an indication if the input word was misspelled</li>
|
|
|
|
<li>Return a list of correctly spelled words which are similar to the input word</li>
|
|
</ul>
|
|
|
|
<p>To perform the function, a user can specify a maximum of eight IBM or user language dictionaries in the input dictionaries parameter.</p>
|
|
|
|
<br>
|
|
<h3>Authorities and Locks</h3>
|
|
|
|
<dl>
|
|
<dt><em>Dictionary Authority</em></dt>
|
|
<dd>*USE</dd>
|
|
|
|
<dt><em>Dictionary Library Authority</em></dt>
|
|
<dd>*USE</dd>
|
|
|
|
<dt><em>Dictionary Lock Authority</em></dt>
|
|
<dd>*SHRNUP</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
<h3><a name="Header_9">Required Parameter Group</a></h3>
|
|
|
|
<dl>
|
|
<dt><strong>Receiver variable</strong></dt>
|
|
<dd>OUTPUT; CHAR(*)
|
|
|
|
<p>The variable that is to receive the information about candidate words. You can specify the size of this area to be smaller than necessary to hold information about each word as long as you specify the length parameter correctly. The API returns only the data that the area can hold. The minimum size area is 8 bytes.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Length of receiver variable</strong></dt>
|
|
<dd>INPUT; BINARY(4)
|
|
|
|
<p>The length of the receiver variable. If the length is larger than the size of the receiver variable, the results may not be predictable. The minimum length is 8 bytes.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Format name</strong></dt>
|
|
<dd>INPUT; CHAR(8)
|
|
|
|
<p>The content and format of the information returned in the receiver variable. You can use this format:</p>
|
|
|
|
<table cellpadding="3">
|
|
<!-- cols="10 90" -->
|
|
<tr>
|
|
<td valign="top"><em>AIDW0100</em></td>
|
|
<td valign="top">Return all candidate words. See <a href="#HDRAID1">AIDW0100 Format</a>.</td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
</dd>
|
|
|
|
<dt><strong>Input word</strong></dt>
|
|
<dd>INPUT; CHAR(*)
|
|
|
|
<p>Locate candidate words that are spelled similarly to this word.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Length of input word</strong></dt>
|
|
<dd>INPUT; BINARY(4)
|
|
|
|
<p>The length of the input word.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Input dictionaries</strong></dt>
|
|
<dd>INPUT; CHAR(*)
|
|
|
|
<p>A structure containing a list of up to eight dictionaries that is used to locate candidate words.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Length of input dictionaries</strong></dt>
|
|
<dd>INPUT; BINARY(4)
|
|
|
|
<p>The length of the input dictionaries parameter. The only valid value is 172 bytes.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Output dictionaries</strong></dt>
|
|
<dd>OUTPUT; CHAR(*)
|
|
|
|
<p>A structure containing a list of up to eight spelling aid dictionaries that were actually used to find candidate words.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Length of output dictionaries</strong></dt>
|
|
<dd>INPUT; BINARY(4)
|
|
|
|
<p>The length of the output dictionaries parameter. The following are valid values:</p>
|
|
|
|
<table cellpadding="3">
|
|
<!-- cols="5 95" -->
|
|
<tr>
|
|
<td valign="top"><em>0</em></td>
|
|
<td valign="top">No dictionaries are returned in the output dictionaries parameter.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top"><em>>0</em></td>
|
|
<td valign="top">The length of space available in the output dictionaries parameter. If this length is larger than the actual size of the output dictionaries parameter, the results may not be predictable.</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="HDRAID1">AIDW0100 Format</a></h3>
|
|
|
|
<p>The following information is returned in the receiver variable for the AIDW0100 format. For detailed descriptions of the fields, see <a href="#HDRAIDFLD">Field Descriptions</a>.</p>
|
|
|
|
<table border width="80%">
|
|
<!-- cols="10 10 20 60" -->
|
|
<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 align="center" valign="bottom">Dec</th>
|
|
<th align="center" valign="bottom">Hex</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top" colspan="4"><strong>Note:</strong> Fixed section.</td>
|
|
</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">4</td>
|
|
<td align="center" valign="top">4</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Bytes available</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">8</td>
|
|
<td align="center" valign="top">8</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Number of words returned</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">12</td>
|
|
<td align="center" valign="top">C</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Number of words available</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">16</td>
|
|
<td align="center" valign="top">10</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Offset to input word</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">20</td>
|
|
<td align="center" valign="top">14</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Length of input word</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">24</td>
|
|
<td align="center" valign="top">18</td>
|
|
<td align="left" valign="top">CHAR(1)</td>
|
|
<td align="left" valign="top">Misspelled</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">25</td>
|
|
<td align="center" valign="top">19</td>
|
|
<td align="left" valign="top">CHAR(3)</td>
|
|
<td align="left" valign="top">Reserved</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">28</td>
|
|
<td align="center" valign="top">1C</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Offset to first word information entry</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">32</td>
|
|
<td align="center" valign="top">20</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Length of word information entry</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">36</td>
|
|
<td align="center" valign="top">24</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Reserved</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top" colspan="4"><strong>Note:</strong> The input word for which candidate words were found. The decimal and hexadecimal offsets are not defined. The input word is found by using the offset to input word field.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top"> </td>
|
|
<td align="center" valign="top"> </td>
|
|
<td align="left" valign="top">CHAR(*)</td>
|
|
<td align="left" valign="top">Input word</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top" colspan="4"><strong>Note:</strong> Format of a word information entry. The following fields are repeated for each word returned. The decimal and hexadecimal offsets depend on the number of words returned. The first word information entry is found by using the offset to first word information entry in the fixed section. Each subsequent word information entry is found by adding the length of a word information entry to the offset of the previous word information entry.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top"> </td>
|
|
<td align="center" valign="top"> </td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Offset to candidate word</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top"> </td>
|
|
<td align="center" valign="top"> </td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Length of candidate word</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top"> </td>
|
|
<td align="center" valign="top"> </td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Output dictionary number</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top"> </td>
|
|
<td align="center" valign="top"> </td>
|
|
<td align="left" valign="top">CHAR(*)</td>
|
|
<td align="left" valign="top">Reserved</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top" colspan="4"><strong>Note:</strong> The following field is repeated for each word returned. Each word is located by the offset to candidate word field and the length of the word is specified in the length of candidate word field.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top"> </td>
|
|
<td align="center" valign="top"> </td>
|
|
<td align="left" valign="top">CHAR(*)</td>
|
|
<td align="left" valign="top">Candidate word</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br><br>
|
|
<h3><a name="HDRAIDFLD">Field Descriptions</a></h3>
|
|
|
|
<p><strong>Bytes available.</strong> The total length of all data available.</p>
|
|
|
|
<p><strong>Bytes returned.</strong> The length of the data actually returned. If the data is truncated because the receiver variable is not large enough to hold all of the data available, the value will be less than the bytes available.</p>
|
|
|
|
<p><strong>Candidate word.</strong> The candidate word that is spelled similar to the input word.</p>
|
|
|
|
<p><strong>Input word.</strong> The word actually used to find candidate words.</p>
|
|
|
|
<p><strong>Length of candidate word.</strong> The length of the candidate word in bytes.</p>
|
|
|
|
<p><strong>Length of input word.</strong> The length of the input word in bytes.</p>
|
|
|
|
<p><strong>Length of word information entry.</strong> The length of one item in the word information entry section.</p>
|
|
|
|
<p><strong>Misspelled.</strong> Determines if the word is misspelled.</p>
|
|
|
|
<table cellpadding="3">
|
|
<!-- cols="5 95" -->
|
|
<tr>
|
|
<td valign="top"><em>0</em></td>
|
|
<td valign="top">The word is spelled correctly.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top"><em>1</em></td>
|
|
<td valign="top">The word is misspelled.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p><strong>Number of words available.</strong> The number of candidate words that were found.</p>
|
|
|
|
<p><strong>Number of words returned.</strong> The number of words actually returned in the receiver variable. If this number is smaller than the number of words available, then all of the words could not fit in the receiver variable.</p>
|
|
|
|
<p><strong>Offset to candidate word.</strong> The byte offset, from the beginning of the receiver variable to the candidate word.</p>
|
|
|
|
<p><strong>Offset to input word.</strong> The byte offset, from the beginning of the receiver variable to the input word.</p>
|
|
|
|
<p><strong>Offset to first word information entry.</strong> The byte offset, from the beginning of the receiver variable to the first item in the word information entry section. If no candidate words are found, the value will be 0.</p>
|
|
|
|
<p><strong>Output dictionary number.</strong> The index into the output dictionary list where the candidate word originated.</p>
|
|
|
|
<p><strong>Reserved.</strong> An ignored field.</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">CPF24B4 E</td>
|
|
<td valign="top">Severe error while addressing parameter list.</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">CPF3CF2 E</td>
|
|
<td valign="top">Error(s) occurred during running of &1 API.</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 &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">CPF8751 E</td>
|
|
<td valign="top">Number of dictionaries is not valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF8752 E</td>
|
|
<td valign="top">No valid dictionaries were found.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF8754 E</td>
|
|
<td valign="top">Length of input word not valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF8755 E</td>
|
|
<td valign="top">Length of input dictionaries not valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF8756 E</td>
|
|
<td valign="top">Length of output dictionaries not valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF8757 E</td>
|
|
<td valign="top">Input word &1 is not valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF9872 E</td>
|
|
<td valign="top">Program or service program &1 in library &2 ended. Reason code &3.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
<hr>
|
|
API introduced: V3R1
|
|
|
|
<hr>
|
|
<table cellpadding="2" cellspacing="2" align="center">
|
|
<tr align="center">
|
|
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a
|
|
href="off1a.htm">Office APIs</a> | <a href=
|
|
"aplist.htm">APIs by category</a></td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|
|
|