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

436 lines
12 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>Process Remote Extended Dynamic SQL (QxdaProcessExtDynEDRS) 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. -->
<!-- File SCRIPT A converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
<!-- at RCHVMW2 on 17 Feb 1999 at 11:05:09 -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!--File Edited March 2001 -->
<!-- This file has undergone html cleanup on 9/24/01 by JET -->
<!--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>Process Remote Extended Dynamic SQL (QxdaProcessExtDynEDRS) API</h2>
<div class="box" style="width: 80%;">
<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%">Connection handle</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">SQL descriptor area</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">SQL communications area</td>
<td align="left" valign="top">Output</td>
<td align="left" valign="top">Char(136)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">QSQPRCED function template format</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(8)</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="left" valign="top">QSQPRCED function template</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="left" valign="top">Receiver variable</td>
<td align="left" valign="top">Output</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">7</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">8</td>
<td align="left" valign="top">Receiver variable format</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(8)</td>
</tr>
<tr>
<td align="center" valign="top">9</td>
<td align="left" valign="top">Additional options</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>
&nbsp;&nbsp;Service Program Name: QXDAEDRS<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Conditional; see <a href="#usage_notes">Usage
Notes</a><br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Process Remote Extended Dynamic SQL (QxdaProcessExtDynEDRS) API is used
to perform extended dynamic SQL operations on the database server system. The
SQL operations are performed by the Process Extended Dynamic SQL (QSQPRCED
API). For more information, see the Process Extended Dynamic SQL (QSQPRCED) API
documentation.</p>
<br>
<h3>Authorities and Locks</h3>
<p>See the Process Extended Dynamic SQL (QSQPRCED) API documentation for
authorities required.</p>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>Connection handle</strong></dt>
<dd>INPUT; BINARY(4)
<p>The handle number of the connection on which to perform the extended dynamic
SQL operation. The connection handle must have been generated by the
QxdaConnectEDRS API in the current job and activation group.</p>
</dd>
<dt><strong>SQL descriptor area</strong></dt>
<dd>INPUT; CHAR(*)
<p>Passes information about the variables being used on a specific SQL
statement. The SQLDA is used for passing the address, data type, length, and
CCSID for variables on an OPEN, EXECUTE, FETCH, or DESCRIBE function.</p>
<p>The format of the structure is standard and is described more completely in
the <a href="../sqlp/rbafykickoff.htm">DB2 UDB for iSeries SQL Programming
Concepts</a> and <a href="../db2/rbafzmst02.htm">DB2 UDB for iSeries SQL
Reference</a> topics.</p>
</dd>
<dt><strong>SQL communications area</strong></dt>
<dd>OUTPUT; CHAR(136)
<p>Returns diagnostic information. It includes the SQLCODE variable, indicating
whether an error has occurred. If SQLCODE has a value of 0 after a call to this
API, the function was successful.</p>
<p>The format of this structure is standard and is described more completely in
the <a href="../sqlp/rbafykickoff.htm">DB2 UDB for iSeries SQL Programming
Concepts</a> and <a href="../db2/rbafzmst02.htm">DB2 UDB for iSeries SQL
Reference</a> books.</p>
</dd>
<dt><strong>QSQPRCED function template format</strong></dt>
<dd>INPUT; CHAR(8)
<p>The format of the function template being used. For possible values, see the
Process Extended Dynamic SQL (QSQPRCED) API documentation. The SQLP0100, SQLP0110,
SQLP0200, SQLP0210, and SQLP0500 QSQPRCED formats are not supported by this API.</p>
</dd>
<dt><strong>QSQPRCED function template</strong></dt>
<dd>INPUT; CHAR(*)
<p>Determines the function to perform, the requested statement to process, and
the SQL package to be used. It also contains the text of the statement, which
is required for the PREPARE function. For the format of this parameter, see the
Process Extended Dynamic SQL (QSQPRCED) API documentation.</p>
</dd>
<dt><strong>Receiver variable</strong></dt>
<dd>OUTPUT; CHAR(*)
<p>The structure in which to return information about the connection. For the
format of this parameter, see <a href="#HDRO0100A">EXDO0100 Format</a>.</p>
</dd>
<dt><strong>Length of receiver variable</strong></dt>
<dd>INPUT; BINARY(4)
<p>The number of bytes that the calling program provides for the receiver
variable data.</p>
</dd>
<dt><strong>Receiver variable format</strong></dt>
<dd>INPUT; CHAR(8)
<p>The format of the receiver variable template being used. The possible value
is:</p>
<table>
<tr>
<td width="15%" valign="top"><em>EXDO0100</em></td>
<td width="85%" valign="top">Basic receiver variable</td>
</tr>
</table>
<br>
</dd>
<dt><strong>Additional options</strong></dt>
<dd>INPUT; BINARY(4)
<p>The following are valid options. The binary OR operation can be used to use
more than one of these options together.</p>
<dl compact>
<dt><em>0x00000000 - 0 - QXDA_EXTDYN_NOOPTS</em></dt>
<dd>&nbsp;</dd>
<dt><em>0x00000001 - 1 - QXDA_CREATE_OBJECTS</em></dt>
<dd>When preparing a statement into an SQL package, create the library and SQL
package if they do not already exist. This option is valid only for QSQPRCED
functions 2 and 9; it is ignored for all other functions. When this option is
specified, all parameters required by the Process Extended Dynamic SQL
(QSQPRCED) API for function 1 must be provided in the QSQPRCED function
template.</dd>
<dt><em>0x00000010 - 16 - QXDA_DEFER_OPEN</em></dt>
<dd>Defer the open until a fetch is performed, when possible. The system will
determine if the open can be deferred. This option is valid only for QSQPRCED
function 4, and only when using a remote connection type. It is ignored in all
other cases. It will cause a failure at fetch time if the fetch immediately
following an open using this option is not from the same cursor as the
open.</dd>
<dt><em>0x00000100 - 256 - QXDA_FIND_STMT</em></dt>
<dd>If this option is specified and the statement name parameter of the
QSQPRCED function template is blank, a search will be performed to see if there
is already a prepared statement in the specified library and package with the
same statement text as the current text. If not, a unique statement name will
be generated and returned in the statement name field of the receiver
variable.</dd>
</dl>
</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="HDRO0100A">EXDO0100 Format</a></h3>
<p>The following table shows the information returned in the EXDO0100 format.
For more details about the fields in this table, see <a href="#HDRFIELD4">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 align="center" valign="bottom">Dec</th>
<th align="center" valign="bottom">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">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">CHAR(18)</td>
<td align="left" valign="top">Statement name</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRFIELD4">Field Descriptions</a></h3>
<p><strong>Bytes available.</strong> The length of the information available to
the API to return, in bytes.</p>
<p><strong>Bytes returned.</strong> The actual number of bytes returned.</p>
<p><strong>Statement name.</strong> The statement name generated when the
QXDA_FIND_STMT option is specified.</p>
<br>
<h3><a name="usage_notes">Usage Notes</a></h3>
<p>This function may be called from the initial thread of a job only.</p>
<br>
<h3>Error Messages</h3>
<table width="100%" cellpadding="3">
<tr>
<th align="left" valign="top">Message ID</th>
<th align="left" valign="top">Error Message Text</th>
</tr>
<tr>
<td width="15%" valign="top">CPF180C E</td>
<td width="85%" valign="top">Function &amp;1 not allowed.</td>
</tr>
<tr>
<td valign="top">CPF24B4 E</td>
<td valign="top">Severe error while addressing parameter list.</td>
</tr>
<tr>
<td valign="top">CPF3C21 E</td>
<td valign="top">Format name &amp;1 is not valid.</td>
</tr>
<tr>
<td valign="top">CPF3C90 E</td>
<td valign="top">Literal value cannot be changed.</td>
</tr>
<tr>
<td 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>
<tr>
<td valign="top">CPFAE14 E</td>
<td valign="top">Cannot allocate &amp;1 bytes.</td>
</tr>
<tr>
<td valign="top">CPFB750 E</td>
<td valign="top">Connection handle specified not valid.</td>
</tr>
<tr>
<td valign="top">CPFB752 E</td>
<td valign="top">Internal error in &amp;1 API.</td>
</tr>
<tr>
<td valign="top">CPFB756 E</td>
<td valign="top">Rollback operation performed.</td>
</tr>
<tr>
<td valign="top">CPFB757 E</td>
<td valign="top">The connection is suspended.</td>
</tr>
<tr>
<td valign="top">CPFB758 E</td>
<td valign="top">The EDRS server system has been switched.</td>
</tr>
<tr>
<td valign="top">CPFB759 E</td>
<td valign="top">Cursor not valid for operation.</td>
</tr>
</table>
<br>
<br>
<hr>
API introduced: V4R4
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#top_Of_Page">Top</a> | <a href=
"file1.htm">Database and File APIs</a> | <a href="aplist.htm">APIs by
category</a></td>
</tr>
</table>
</center>
<br>
</body>
</html>