ibm-information-center/dist/eclipse/plugins/i5OS.ic.db2_5.4.0.1/rbafzmstsqlvaroc.htm

249 lines
12 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 xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="dc.language" scheme="rfc1766" 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. -->
<meta name="dc.date" scheme="iso8601" content="2005-09-19" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<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="keywords" content="SQLTYPE field of SQLDA, SQLLEN field of SQLDA,
SQLIND field of SQLDA, SQLNAME field of SQLDA, determined by SQLLEN variable,
scale of data, SQLVAR field of SQLDA, SQLLONGLEN field of SQLDA,
SQLDATALEN field of SQLDA" />
<title>Field descriptions in an occurrence of SQLVAR</title>
<link rel="stylesheet" type="text/css" href="ibmidwb.css" />
<link rel="stylesheet" type="text/css" href="ic.css" />
</head>
<body>
<a id="Top_Of_Page" name="Top_Of_Page"></a><!-- Java sync-link -->
<script language = "Javascript" src = "../rzahg/synch.js" type="text/javascript"></script>
<a name="sqlvaroc"></a>
<h2 id="sqlvaroc"><a href="rbafzmst02.htm#ToC_1499">Field descriptions in an occurrence of SQLVAR</a></h2><a id="idx3446" name="idx3446"></a><a id="idx3447" name="idx3447"></a><a id="idx3448" name="idx3448"></a><a id="idx3449" name="idx3449"></a><a id="idx3450" name="idx3450"></a><a id="idx3451" name="idx3451"></a>
<a name="wq2001"></a>
<h3 id="wq2001"><a href="rbafzmst02.htm#ToC_1500">Fields in an occurrence of a base SQLVAR</a></h3>
<p>&nbsp;</p>
<a name="fdr"></a>
<table id="fdr" width="100%" summary="" border="1" frame="hsides" rules="rows">
<caption>Table 96. Field Descriptions for an SQLVAR</caption>
<thead valign="bottom">
<tr>
<th id="wq2002" width="14%" align="left" valign="bottom">
<div class="lines">C Name <sup class="fn"><a href="rbafzmstsqlvaroc.htm#lowerc">104</a></sup><br />
COBOL Name<br />
PL/I Name<br />
RPG Name<br />
</div></th>
<th id="wq2003" width="14%" align="left" valign="bottom">
<div class="lines">Field<br />
Data Type<br />
</div></th>
<th id="wq2004" width="35%" align="left" valign="bottom">Usage in DESCRIBE and PREPARE (set by
the database manager)</th>
<th id="wq2005" width="35%" align="left" valign="bottom">Usage in FETCH, OPEN, CALL, and EXECUTE
(set by the user prior to executing the statement)</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left" valign="top" headers="wq2002">
<div class="lines">sqltype<br />
SQLTYPE<br />
</div></td>
<td align="left" valign="top" headers="wq2003">SMALLINT</td>
<td align="left" valign="top" headers="wq2004">Indicates the data type of the column and
whether it can contain nulls. For a description of the type codes, see <a href="rbafzmstsqltc.htm#scatlen">Table 98</a>.
<p>For a distinct type, the data type on which the distinct
type is based is placed in this field. The base SQLVAR contains no indication
that this is part of the description of a distinct type.</p></td>
<td align="left" valign="top" headers="wq2005">Indicates the data type of the host variable
and whether an indicator variable is provided. For a description of the type
codes, see <a href="rbafzmstsqltc.htm#scatlen">Table 98</a>.</td>
</tr>
<tr>
<td align="left" valign="top" headers="wq2002">
<div class="lines">sqllen<br />
SQLLEN<br />
</div></td>
<td align="left" valign="top" headers="wq2003">SMALLINT</td>
<td align="left" valign="top" headers="wq2004">The length attribute of the column. For datetime
columns, the length of the string representation of the values. See <a href="rbafzmstsqltc.htm#scatlen">Table 98</a>.
<p>For a LOB, the value is 0 regardless of the length attribute
of the LOB. Field SQLLONGLEN in the extended SQLVAR entry contains the length
attribute of the LOB.</p></td>
<td align="left" valign="top" headers="wq2005">The length attribute of the host variable.
See <a href="rbafzmstsqltc.htm#scatlen">Table 98</a>.
<p>For a LOB, the value is 0 regardless of the
length attribute of the LOB. Field SQLLONGLEN in the extended SQLVAR entry
contains the length attribute of the LOB.</p></td>
</tr>
<tr>
<td align="left" valign="top" headers="wq2002">
<div class="lines">sqlres<br />
SQLRES<br />
</div></td>
<td align="left" valign="top" headers="wq2003">CHAR(12)</td>
<td align="left" valign="top" headers="wq2004">Reserved. Provides boundary alignment for
SQLDATA.</td>
<td align="left" valign="top" headers="wq2005">Reserved. Provides boundary alignment for
SQLDATA.</td>
</tr>
<tr>
<td align="left" valign="top" headers="wq2002">
<div class="lines">sqldata<br />
SQLDATA<br />
</div></td>
<td align="left" valign="top" headers="wq2003">pointer</td>
<td align="left" valign="top" headers="wq2004">The CCSID of a string column as described
in <a href="rbafzmstsname.htm#dccsid">Table 99</a>.</td>
<td align="left" valign="top" headers="wq2005">Contains the address of the host variable.
<p>For LOB host variables, if the SQLDATALEN field in the extended SQLVAR is
null, this points to the four-byte LOB length, followed immediately by the
LOB data.</p>
<p>If the SQLDATALEN field in the extended SQLVAR is not null,
this points to the LOB data and the SQLDATALEN field points to the four-byte
LOB length.</p></td>
</tr>
<tr>
<td align="left" valign="top" headers="wq2002">
<div class="lines">sqlind<br />
SQLIND<br />
</div></td>
<td align="left" valign="top" headers="wq2003">pointer</td>
<td align="left" valign="top" headers="wq2004">Reserved</td>
<td align="left" valign="top" headers="wq2005">Contains the address of the indicator variable.
Not used if there is no indicator variable (as indicated by an even value
of SQLTYPE).</td>
</tr>
<tr>
<td align="left" valign="top" headers="wq2002">
<div class="lines">sqlname<br />
SQLNAME<br />
</div></td>
<td align="left" valign="top" headers="wq2003">VARCHAR(30)</td>
<td align="left" valign="top" headers="wq2004">The unqualified name of the column. If the
column does not have a name, a string is constructed from the expression and
returned.
<p>The name is case sensitive and does not contain surrounding delimiters.</p></td>
<td align="left" valign="top" headers="wq2005">Contains the CCSID of the host variable as
described in <a href="rbafzmstsname.htm#dccsid">Table 99</a>.</td>
</tr>
</tbody>
</table><a id="idx3452" name="idx3452"></a><a id="idx3453" name="idx3453"></a><a id="idx3454" name="idx3454"></a>
<a name="wq2006"></a>
<h3 id="wq2006"><a href="rbafzmst02.htm#ToC_1501">Fields in an occurrence of a secondary SQLVAR</a></h3>
<p>&nbsp;</p>
<a name="fdr2"></a>
<table id="fdr2" width="100%" summary="" border="1" frame="hsides" rules="rows">
<caption>Table 97. Field Descriptions for an Extended SQLVAR</caption>
<thead valign="bottom">
<tr>
<th id="wq2007" width="21%" align="left" valign="bottom">
<div class="lines">C Name <sup class="fn"><a href="rbafzmstsqlvaroc.htm#lowerc2">105</a></sup><br />
COBOL Name<br />
PL/I Name<br />
RPG Name<br />
</div></th>
<th id="wq2008" width="14%" align="left" valign="bottom">
<div class="lines">Field<br />
Data Type<br />
</div></th>
<th id="wq2009" width="28%" align="left" valign="bottom">Usage in DESCRIBE and PREPARE (set by
the database manager)</th>
<th id="wq2010" width="35%" align="left" valign="bottom">Usage in FETCH, OPEN, CALL, and EXECUTE
(set by the user prior to executing the statement)</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left" valign="top" headers="wq2007">
<div class="lines">len.sqllonglen<br />
SQLLONGL<br />
SQLLONGLEN<br />
</div></td>
<td align="left" valign="top" headers="wq2008">INTEGER</td>
<td align="left" valign="top" headers="wq2009">The length attribute of a LOB column.</td>
<td align="left" valign="top" headers="wq2010">The length attribute of a LOB host variable.
The database manager ignores the SQLLEN field in the base SQLVAR for these
data types. The length attribute indicates the number of bytes for a BLOB
or CLOB, and the number of characters for a DBCLOB.</td>
</tr>
<tr>
<td align="left" valign="top" headers="wq2007">*</td>
<td align="left" valign="top" headers="wq2008">CHAR(12)</td>
<td align="left" valign="top" headers="wq2009">Reserved. Provides boundary alignment for
SQLDATALEN.</td>
<td align="left" valign="top" headers="wq2010">Reserved. Provides boundary alignment for
SQLDATALEN.</td>
</tr>
<tr>
<td align="left" valign="top" headers="wq2007">*</td>
<td align="left" valign="top" headers="wq2008">pointer</td>
<td align="left" valign="top" headers="wq2009">Reserved.</td>
<td align="left" valign="top" headers="wq2010">Reserved.</td>
</tr>
<tr>
<td align="left" valign="top" headers="wq2007">
<div class="lines">sqldatalen<br />
SQLDATAL<br />
SQLDATALEN<br />
</div></td>
<td align="left" valign="top" headers="wq2008">pointer</td>
<td align="left" valign="top" headers="wq2009">Not used.</td>
<td align="left" valign="top" headers="wq2010">Used only for LOB host variables.
<p>If the
value of this field is not null, this field points to a four-byte long buffer
that contains the actual length of the LOB in bytes (even for DBCLOBs). The
SQLDATA field in the matching base SQLVAR then points to the LOB data.</p>
<p>If the value of this field is null, the actual length of the LOB is stored
in the first four bytes pointed to by the SQLDATA field in the matching base
SQLVAR, and the LOB data immediately follows the four-byte length. The actual
length indicates the number of bytes for a BLOB or CLOB and the number of
double-byte characters for a DBCLOB.</p>
<p>Regardless of whether this field
is used, field SQLLONGLEN must be set.</p></td>
</tr>
<tr>
<td align="left" valign="top" headers="wq2007">
<div class="lines">sqldatatype_name<br />
SQLTNAME<br />
SQLDATATYPE-NAME<br />
</div></td>
<td align="left" valign="top" headers="wq2008">VARCHAR (30)</td>
<td align="left" valign="top" headers="wq2009">The SQLTNAME field of the extended SQLVAR
is set to one of the following:
<ul>
<li>For a distinct type column, the database manager sets this to the fully
qualified distinct type name. If the qualified name is longer than 30 bytes,
it is truncated.</li>
<li>For a label, the database manager sets this to the first 20 bytes of the
label.</li>
<li>For a column name, the database manager sets this to the column name.</li></ul></td>
<td align="left" valign="top" headers="wq2010">Not used.</td>
</tr>
</tbody>
</table>
<hr /><div class="fnnum"><a id="lowerc" name="lowerc">104</a>.</div>
<div class="fntext">In this column, the lowercase name is the C Name.
The uppercase name is the PL/I, COBOL, and RPG Name.</div><div class="fnnum"><a id="lowerc2" name="lowerc2">105</a>.</div>
<div class="fntext">In this column, the lowercase name is the C Name.
The first uppercase name is the PL/I and RPG Name. The second uppercase name
is the COBOL Name.</div>
<br />
<hr /><br />
[ <a href="#Top_Of_Page">Top of Page</a> | <a href="rbafzmstfielddescsqlda.htm">Previous Page</a> | <a href="rbafzmstsqltc.htm">Next Page</a> | <a href="rbafzmst02.htm#wq1">Contents</a> |
<a href="rbafzmstindex.htm#index">Index</a> ]
<a id="Bot_Of_Page" name="Bot_Of_Page"></a>
</body>
</html>