ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaie_5.4.0.1/rzaieapi_qtmhcvtdb.htm

210 lines
11 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="topic" />
<meta name="DC.Title" content="Convert to DB (QtmhCvtDB) API" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2002,2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2002,2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzaieapi_qtmhcvtdb" />
<meta name="DC.Language" content="en-us" />
<!-- 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. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Convert to DB (QtmhCvtDB) API</title>
</head>
<body id="rzaieapi_qtmhcvtdb"><a name="rzaieapi_qtmhcvtdb"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<!--Java sync-link--><h1 class="topictitle1">Convert to DB (QtmhCvtDB) API</h1>
<div><div class="important"><span class="importanttitle">Important:</span> Information
for this topic supports the latest PTF levels for HTTP Server for i5/OS .
It is recommended that you install the latest PTFs to upgrade to the latest
level of the HTTP Server for i5/OS. Some of the topics documented here are
not available prior to this update. See <a href="http://www-03.ibm.com/servers/eserver/iseries/software/http/services/service.html" target="_blank">http://www.ibm.com/servers/eserver/iseries/software/http/services/service.htm</a> <img src="www.gif" alt="Link outside Information Center" /> for more information. </div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" class="figborder" frame="void" border="0" rules="none"><tbody><tr><td colspan="4" valign="top">Required Parameter Group:</td>
</tr>
<tr><td align="right" valign="top" width="6.313131313131313%">1</td>
<td valign="top" width="31.313131313131315%">Qualified database file name</td>
<td valign="top" width="31.060606060606062%">Input</td>
<td valign="top" width="31.313131313131315%">Char(20)</td>
</tr>
<tr><td align="right" valign="top" width="6.313131313131313%">2</td>
<td valign="top" width="31.313131313131315%">Input string</td>
<td valign="top" width="31.060606060606062%">Input</td>
<td valign="top" width="31.313131313131315%">Char(*)</td>
</tr>
<tr><td align="right" valign="top" width="6.313131313131313%">3</td>
<td valign="top" width="31.313131313131315%">Length of input string</td>
<td valign="top" width="31.060606060606062%">Input</td>
<td valign="top" width="31.313131313131315%">Binary(4)</td>
</tr>
<tr><td align="right" valign="top" width="6.313131313131313%">4</td>
<td valign="top" width="31.313131313131315%">Response variable</td>
<td valign="top" width="31.060606060606062%">Output</td>
<td valign="top" width="31.313131313131315%">Char(*)</td>
</tr>
<tr><td align="right" valign="top" width="6.313131313131313%">5</td>
<td valign="top" width="31.313131313131315%">Length of response variable</td>
<td valign="top" width="31.060606060606062%">Input</td>
<td valign="top" width="31.313131313131315%">Binary(4)</td>
</tr>
<tr><td align="right" valign="top" width="6.313131313131313%">6</td>
<td valign="top" width="31.313131313131315%">Length of response available</td>
<td valign="top" width="31.060606060606062%">Output</td>
<td valign="top" width="31.313131313131315%">Binary(4)</td>
</tr>
<tr><td align="right" valign="top" width="6.313131313131313%">7</td>
<td valign="top" width="31.313131313131315%">Response code</td>
<td valign="top" width="31.060606060606062%">Output</td>
<td valign="top" width="31.313131313131315%">Binary(4)</td>
</tr>
<tr><td align="right" valign="top" width="6.313131313131313%">8</td>
<td valign="top" width="31.313131313131315%">Error Code</td>
<td valign="top" width="31.060606060606062%">I/O</td>
<td valign="top" width="31.313131313131315%">Char(*)</td>
</tr>
</tbody>
</table>
</div>
<p>The QtmhCvtDB API provides an interface for CGI programs to parse CGI input,
defined as a series of keywords and their values, into a buffer which is formatted
according to a DDS file specification. CGI input data, which comes to the
CGI program as character data, will be converted by the QtmhCvtDB API to the
data type defined for the keyword by the corresponding field name in the input
DDS file. Language statements, such as the ILE C #pragma mapinc statement,
provide the ability to map the returned structure with field names defined
in the DDS file. See the appropriate language users guide for details. </p>
<div class="note"><span class="notetitle">Note:</span> QtmhCvtDB API is not allowed in CGI mode %%BINARY%%. </div>
<p>The following DDS field types are handled:</p>
<ul><li><strong>A</strong> - Alphanumeric (see note 1 below)</li>
<li><strong>P</strong> - Packed Decimal (see note 2 below)</li>
<li><strong>S</strong> - Zoned Decimal</li>
<li><strong>F</strong> - Floating Point</li>
<li><strong>T</strong> - Time</li>
<li><strong>L</strong> - Date</li>
<li><strong>Z</strong> - Timestamp</li>
<li><strong>B</strong> - Binary (see note 3 below)</li>
<li><strong>O</strong> - DBCS</li>
</ul>
<p>The following DDS field types are <u>not</u> handled:</p>
<ul><li><strong>H</strong> - Hexadecimal (see note 4 below)</li>
<li><strong>G</strong> - Graphic</li>
<li><strong>J</strong> - DBCS</li>
<li><strong>E</strong> - DBCS</li>
</ul>
<div class="note"><span class="notetitle">Notes:</span> <ol><li>The VARLEN keyword is not supported.</li>
<li>When using a packed decimal field, the #pragma mapinc() must use <strong>_P</strong> the
option, to create a packed structure.</li>
<li>Input to Binary fields is converted to integer. The DDS file specification
must declare zero decimal positions (for example, “xB 0”, where x is 1-9).</li>
<li>ILE C converts hex DDS field data to character fields. Since the input
stream to QtmhCvtDB() is a text string, the “hex” data would be converted
from text to character fields. Therefore, using the <strong>A</strong> (Alphanumeric)
field type to obtain the same conversion.</li>
</ol>
</div>
</div>
<div class="nested1" id="required"><a name="required"><!-- --></a><h2 class="topictitle2">Required parameter group</h2>
<div><dl><dt class="dlterm"><strong>Qualified database file name</strong></dt>
<dd>Input:CHAR(20) <p>The input variable containing the name of the database
file defining field names and data types for the keywords anticipated in the
input to the CGI program. Typically, the database file is generated using
DDS to define the fields corresponding to the keywords anticipated in the
CGI inputs. The first 10 characters contain the database file name, and the
second 10 characters contain the library name.</p>
</dd>
</dl>
<dl><dt class="dlterm"><strong>Input string</strong></dt>
<dd>INPUT:CHAR(*) <p>The input variable containing the string of CGI input
parameters to be parsed. When the environment variable REQUEST_METHOD indicates
that the method is GET, characters up to the first <tt>?</tt> are ignored.
The string must meet the format requirements for CGI input keyword strings.</p>
</dd>
</dl>
<dl><dt class="dlterm"><strong>Length of input string</strong></dt>
<dd>INPUT:BINARY(4) <p>The input variable containing the length of the character
string that contains the CGI input parameters to be parsed. The length of
the string must be greater than 0.</p>
</dd>
</dl>
<dl><dt class="dlterm"><strong>Response variable</strong></dt>
<dd>OUTPUT:CHAR(*) <p>The output variable which is to contain the structure
mapped according to the database file describing the input parameters anticipated
by the CGI program.</p>
</dd>
</dl>
<dl><dt class="dlterm"><strong>Length of response available</strong></dt>
<dd>INPUT:BINARY(4)<p>The input variable containing the total length of the
buffer into which the CGI input parameters will be parsed.</p>
</dd>
</dl>
<dl><dt class="dlterm"><strong>Length of response</strong></dt>
<dd>OUTPUT:BINARY(4) <p>The output variable that contains the length of the
response. If the response variable is too small to contain the entire response,
this parameter will be set to the size that is required to contain the entire
response.</p>
</dd>
</dl>
<dl><dt class="dlterm"><strong>Response code</strong></dt>
<dd>OUTPUT:BINARY(4) <p>A code that indicates the status of the request.</p>
<ul><li><strong>0</strong> - All keywords have been translated according the database file. </li>
<li><strong>-1</strong> - The database file contains definitions for structure fields
for which the CGI input has no corresponding keyword. </li>
<li><strong>-2</strong> - The CGI input contains one or more keywords for which the
database file contains no corresponding field. </li>
<li><strong>-3</strong> - A combination of the condition for response codes -1 and -2
has been detected. </li>
<li><strong>-4</strong> - An error occurred while converting the CGI input string to
the DDS defined data types. The data may or may not be usable. </li>
<li><strong>-5</strong> - This API is not valid when a program is not called by HTTP
Server. No data parsing is done. </li>
<li><strong>-6</strong> - This API is not valid when operating in %%BINARY%% mode. No
data parsing is done.</li>
</ul>
</dd>
</dl>
<dl><dt class="dlterm"><strong>Error Code</strong></dt>
<dd>I/O CHAR(*) <p>The structure in which to return error information. For
the format of the structure and for details on how to process API errors,
see the API error reporting topic in the iSeries™ Information Center.</p>
</dd>
</dl>
</div>
</div>
<div class="nested1" id="error"><a name="error"><!-- --></a><h2 class="topictitle2">Error messages</h2>
<div><dl><dt class="dlterm"><strong>CPF24B4 E</strong></dt>
<dd>Severe Error while addressing parameter list.</dd>
</dl>
<dl><dt class="dlterm"><strong>CPF3C17 E</strong></dt>
<dd>Error occurred with input data parameter.</dd>
</dl>
<dl><dt class="dlterm"><strong>CPF3C19 E</strong></dt>
<dd>Error occurred with receiver variable specified.</dd>
</dl>
<dl><dt class="dlterm"><strong>CPF3CF1 E</strong></dt>
<dd>Error code parameter not valid.</dd>
</dl>
<dl><dt class="dlterm"><strong>CPF9810 E</strong></dt>
<dd>Library &amp;1 not found.</dd>
</dl>
<dl><dt class="dlterm"><strong>CPF9812 E</strong></dt>
<dd>File &amp;1 in library &amp;2 not found.</dd>
</dl>
<dl><dt class="dlterm"><strong>CPF9822 E</strong></dt>
<dd>Not authorized to file &amp;1 in library &amp;2</dd>
</dl>
</div>
</div>
</body>
</html>