ibm-information-center/dist/eclipse/plugins/i5OS.ic.sqlp_5.4.0.1/rbafysqlda.htm

75 lines
5.2 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="reference" />
<meta name="DC.Title" content="SQL descriptor areas" />
<meta name="abstract" content="Dynamic SQL uses an SQL descriptor area (SQLDA) to pass information about an SQL statement between SQL and your application. A descriptor is required for running the DESCRIBE, DESCRIBE INPUT and DESCRIBE TABLE statements, and can also be used on the PREPARE, OPEN, FETCH, CALL, and EXECUTE statements." />
<meta name="description" content="Dynamic SQL uses an SQL descriptor area (SQLDA) to pass information about an SQL statement between SQL and your application. A descriptor is required for running the DESCRIBE, DESCRIBE INPUT and DESCRIBE TABLE statements, and can also be used on the PREPARE, OPEN, FETCH, CALL, and EXECUTE statements." />
<meta name="DC.subject" content="SQL descriptor area (SQLDA), dynamic SQL, SQLDA (SQL descriptor area), SQLDA (SQL descriptor area), programming language, use in" />
<meta name="keywords" content="SQL descriptor area (SQLDA), dynamic SQL, SQLDA (SQL descriptor area), SQLDA (SQL descriptor area), programming language, use in" />
<meta name="DC.Relation" scheme="URI" content="rbafyprocesssqlda.htm" />
<meta name="DC.Relation" scheme="URI" content="../db2/rbafzmstsqlcca.htm" />
<meta name="DC.Relation" scheme="URI" content="../db2/rbafzmstsqldda.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbafysqlda" />
<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>SQL descriptor areas</title>
</head>
<body id="rbafysqlda"><a name="rbafysqlda"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">SQL descriptor areas</h1>
<div><p>Dynamic SQL uses an SQL descriptor area (SQLDA) to pass information
about an SQL statement between SQL and your application. A descriptor is required
for running the DESCRIBE, DESCRIBE INPUT and DESCRIBE TABLE statements, and
can also be used on the PREPARE, OPEN, FETCH, CALL, and EXECUTE statements.</p>
<div class="section"><p>The meaning of the information in an SQLDA depends on its use.
In PREPARE and DESCRIBE, an SQLDA provides information to an application program
about a prepared statement. In DESCRIBE INPUT, the SQL descriptor area provides
information to an application program about parameter markers in a prepared
statement. In DESCRIBE TABLE, the SQLDA provides information
to an application program about the columns in a table or view. In OPEN, EXECUTE,
CALL, and FETCH, an SQLDA provides information about host variables. For example,
you can read values into the SQLDA using a DESCRIBE statement, change the
data values in the descriptor to use the host variables, and then reuse the
same descriptor in a FETCH statement.</p>
</div>
<div class="section"><p>If your application allows you to have several cursors open at
the same time, you can code several SQLDAs, one for each dynamic SELECT statement.
</p>
</div>
<div class="section"><p><img src="./delta.gif" alt="Start of change" />There are two types of SQLDAs. One is defined
with the ALLOCATE DESCRIPTOR statement. The other is defined using the SQLDA
structure.<img src="./deltaend.gif" alt="End of change" /></p>
<p><img src="./delta.gif" alt="Start of change" />ALLOCATE DESCRIPTOR is not supported in
REXX. SQLDAs can be used in C, C++, <span class="keyword">COBOL</span>,
PL/I, REXX, and <span class="keyword">RPG</span>. Because
RPG/400 does not provide a way to set pointers, the SQLDA must be set outside
the RPG/400 program by a PL/I, C, C++, COBOL, or ILE RPG program. That program
must then call the RPG/400 program.<img src="./deltaend.gif" alt="End of change" /></p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafyprocesssqlda.htm" title="There are two basic types of SELECT statements: fixed list and varying list.">Process SELECT statements and use a descriptor</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../db2/rbafzmstsqlcca.htm">SQLCA (SQL communications area)</a></div>
<div><a href="../db2/rbafzmstsqldda.htm">SQLDA (SQL descriptor area)</a></div>
</div>
</div>
</body>
</html>