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

6751 lines
191 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!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>Query (QQQQRY) 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 -->
<!--File Edited March 2001 -->
<!-- This file has undergone html cleanup on 9/25/01 by JET -->
<!-- Addition of link to examples topic on 07/17/02 by JET -->
<!-- Addition to the UFCB for larger invmark on 11/12/02 by keb -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!--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>Query (QQQQRY) 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%">Query option requested</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Char(10)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">User file control block</td>
<td align="left" valign="top">I/O</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">Query definition template</td>
<td align="left" valign="top">I/O</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Literal values</td>
<td align="left" valign="top">I/O</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="left" valign="top">Access plan control block</td>
<td align="left" valign="top">I/O</td>
<td align="left" valign="top">Char(48)</td>
</tr>
<tr>
<td align="center" valign="top">6</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;Default Public Authority: *EXCLUDE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Conditional; see <a href="#usage_notes">Usage
Notes</a>.<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Query (QQQQRY) API gets a set of database records that satisfies a
database query request. Using this API you can do all the things you could do
with the Open Query File (OPNQRYF) command. You can also perform subqueries,
perform unions, and use SQL host variables.</p>
<p>The QQQQRY API can be used to do any combination of the following database
functions:</p>
<ul>
<li>Join records from more than one file, member, and record format. The join
operation that is performed may be equal or nonequal in nature.</li>
<li>Calculate new field values by using numeric and character operations on
field values and constants.</li>
<li>Group records by like values of one or more fields, and calculate aggregate
functions, such as minimum field value and average field value, for each
group.</li>
<li>Select a subset of the available records. Selection can be done both before
and after grouping the records.</li>
<li>Arrange result records by the value of one or more key fields.</li>
</ul>
<p>You can use this API to run a query, create an access plan, or get
information from the query definition template (QDT). When you run the query,
the API uses the information you provide with the query definition template to
extract information and data from the database. Creating an access plan makes
it possible to run the query with better performance. Checking the query
definition template allows you to validate the values in this query definition
template.</p>
<p>The format definition is part of the query definition template and can be
created and saved with extracted information by the Retrieve Database File
Description (QDBRTVFD) API. When you are finished using the QQQQRY API, you
should close the file (using the Close File (CLOF) command) to free up
resources.</p>
<p>Another part of the query definition template is the access plan for the
query. Using this API with the Create Query Access Plan (CRTQAP) value of the
query option requested parameter, you can build an access plan to more
efficiently run a query more than once. You can then use the access plan
control block parameter to point to the access plan. This greatly improves the
time it takes to perform subsequent runs of this query using this API and the
RUNQRY option. Every time a query is run, the system first checks to see if an
access plan has been specified. If one has, that is what is used to get the
data requested by the query. If no access plan has been specified, a new one is
built dynamically.</p>
<br>
<h3>Authorities and Locks</h3>
<dl compact>
<dt><em>User Space Authority</em></dt>
<dd>*CHANGE</dd>
<dt><em>Library Authority</em></dt>
<dd>*EXECUTE</dd>
<dt><em>File Authority</em></dt>
<dd>*OBJOPR</dd>
<dt><em>User Space Lock</em></dt>
<dd>*SHRRD</dd>
</dl>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>Query option requested</strong></dt>
<dd>INPUT; CHAR(10)
<p>One of three options to be used:</p>
<ul>
<li>RUNQRY</li>
<li>Run query</li>
<li>CRTQAP</li>
<li>Create query access plan</li>
<li>CHKQDT</li>
<li>Check query definition templates</li>
</ul>
<br>
</dd>
<dt><strong>User file control block</strong></dt>
<dd>I/O; CHAR(*)
<p>One or more selected options for input and output of the specified query.
This parameter need only be used along with the RUNQRY query option. See <a
href="#HDRQDBUFCB">User File Control Block (QDBUFCB_T) Structure</a> for a list
of available options.</p>
</dd>
<dt><strong>Query definition template</strong></dt>
<dd>I/O; CHAR(*)
<p>The information required to create objects that are used to query a
database. It contains feedback information from the creation of objects. If a
pointer to the access plan is specified, the corresponding query definition
templates must also be specified.</p>
</dd>
<dt><strong>Literal values</strong></dt>
<dd>I/O; CHAR(*)
<p>This parameter is used to put into effect SQL host variables. When SQL host
variables are used, this is a list of constant values used to run a query. If
this parameter is to be ignored, a null pointer can be specified for the
parameter. Once the literal value is specified on a call, it must always be
specified.</p>
</dd>
<dt><strong>Access plan control block</strong></dt>
<dd>I/O; CHAR(48)
<p>A string of bytes that point to the access plan control block and give the
size the access plan requires. This parameter must be specified for the RUNQRY
query option when you want to specify an access plan and for the CRTQAP query
option. The format for this parameter is:</p>
<table width="100%">
<tr>
<td width="20%" valign="top"><em>PTR(SPP)</em></td>
<td width="85%" valign="top">A space pointer that indicates the area of storage
that contains the access plan. This area must begin on a 16-byte boundary and
be all zeros.</td>
</tr>
<tr>
<td valign="top"><em>Bin(4)</em></td>
<td valign="top">The size of storage needed to contain the access plan.</td>
</tr>
<tr>
<td valign="top"><em>Char(28)</em></td>
<td valign="top">Reserved.</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="HDRFGIQ">Data Structures</a></h3>
<p>The QQQQRY API uses information in four structures to carry out a query. All
structures are used together to perform the function you have selected using
the query option requested parameter. The names of these structures are:</p>
<table width="100%">
<tr>
<td width="20%" valign="top"><em>QDBQH_T</em></td>
<td width="85%" valign="top">Query definition template</td>
</tr>
<tr>
<td valign="top"><em>Qdb_Qddfmt_t</em></td>
<td valign="top">Format definition template</td>
</tr>
<tr>
<td valign="top"><em>QDBUFCB_T</em></td>
<td valign="top">User file control block</td>
</tr>
<tr>
<td valign="top"><em>QQQVALS_T</em></td>
<td valign="top">Values for query variable fields</td>
</tr>
</table>
<br>
<p>The following sections show you in a general way how this information is
structured.</p>
<br>
<h3><a name="HDRQDTD">Query Definition Template (QDBQH_T)</a></h3>
<p>The query definition template provides information about the query that is
to be performed. <a href="#FIGQDT">QDBQH_T Format</a> shows the general layout
of this format.</p>
<p>Notice the box marked with a <strong>(1)</strong> in <a href="#FIGQDT">
QDBQH_T Format</a>. The topic <a href="#HDRQFIL2">Format Definition Template
(Qdb_Qddfmt_t)</a> provides the layout of the entire record format
specification.</p>
<p>The offsets and descriptions of all the fields contained in this structure
are shown in the following tables. You can see this source in member QQQQRY in
the QSYSINC library.</p>
<p><strong><a name="FIGQDT">QDBQH_T Format</a></strong></p>
<p><img src="RBAFX511.gif" alt="QDBQH_T Format"></p>
<br>
<h3><a name="HDRQDBQH">Query Definition Header (QDBQH_T)</a></h3>
<p>This is the first structure and is located at offset zero. <a name=
"SPTDBQFILO"><em>(Ref #1.)</em></a></p>
<table border width="100%" cellpadding="4">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="12%">BIN(4)</td>
<td align="left" valign="top" width="20%">qdbqfilo</td>
<td align="left" valign="top" width="53%">Offset to file, library, format, and
member specifications.</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qdbqfldo</td>
<td align="left" valign="top">Offset to the record specifications. 0 indicates
that the record specifications should be taken from the file format. 0 is not
valid if there are multiple files in the file specification and this is not a
group-by query.</td>
</tr>
<tr>
<td align="center" valign="top">8</td>
<td align="center" valign="top">8</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qdbqjoio</td>
<td align="left" valign="top">Offset to join specifications. 0 indicates that
this is not a join query.</td>
</tr>
<tr>
<td align="center" valign="top">12</td>
<td align="center" valign="top">C</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qdbqselo</td>
<td align="left" valign="top">Offset to the record selection specifications. 0
indicates that no record selection is to occur.</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qdbqkeyo</td>
<td align="left" valign="top">Offset to the order by specifications. 0
indicates that the records are returned in the file's access path order. If
this is a join, the access path order of the first file in the file array is
used. -1 indicates that the result records are returned in no guaranteed order;
running the same query twice may produce a different result order.</td>
</tr>
<tr>
<td align="center" valign="top">20</td>
<td align="center" valign="top">14</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qdbqgrpo</td>
<td align="left" valign="top">Offset to the group-by-selection specifications.
0 indicates that no group by is to occur.</td>
</tr>
<tr>
<td align="center" valign="top">24</td>
<td align="center" valign="top">18</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(4)</td>
<td align="left" valign="top">qdbqdt_1</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="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qdbqgpso</td>
<td align="left" valign="top">Offset to the group by selection specifications.
0 indicates that no group by selection is to occur. If field qdbqgrpo is 0,
this offset is ignored.</td>
</tr>
<tr>
<td align="center" valign="top">32</td>
<td align="center" valign="top">20</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqfin</td>
<td align="left" valign="top">Query completion indicator.
<dl compact>
<dt><em>A</em></dt>
<dd>Query need not be completed before returning. The database attempts to
minimize the entire query and retrieval time. Selection may be done at I/O
time.</dd>
<dt><em>F</em></dt>
<dd>Query need not be complete before returning. The database attempts to
minimize the time to get the first buffer of results. Selection may be done at
I/O time.</dd>
<dt><em>M</em></dt>
<dd>Query need not be complete before returning; however, selection at I/0 time
should be minimized so that long waits for the next selected records are
minimized.</dd>
<dt><em>C</em></dt>
<dd>Query must be completed before returning. If this is a join, the records
must be put in a temporary file.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">33</td>
<td align="center" valign="top">21</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqtem</td>
<td align="left" valign="top">Query temporary result indicator.
<dl compact>
<dt><em>N</em></dt>
<dd>Temporary results should be prohibited.</dd>
<dt><em>O</em></dt>
<dd>Temporary results are allowed but should be used only if necessary to do
the query. If a read previous operation can be requested, then <samp>O</samp>
must be used.</dd>
<dt><em>T</em></dt>
<dd>Temporary results are allowed but should be used only if necessary to do
the query. However, if temporary results are used, then use the last TSORT
method, which reads directly from its sort. This option cannot be specified if
a read previous operation is to be used.</dd>
<dt><em>A</em></dt>
<dd>Temporary results are allowed and should be used if better performance can
be achieved by using a temporary result. Use <samp>A</samp> when the user does
not request previous records to be read.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">34</td>
<td align="center" valign="top">22</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">qdbqattr</td>
<td align="left" valign="top">Query attributes.</td>
</tr>
<tr>
<td align="center" valign="top">34</td>
<td align="center" valign="top">22</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqnst</td>
<td align="left" valign="top">Status messages. Status messages are never sent
for batch jobs.
<dl compact>
<dt><em>0</em></dt>
<dd>Do not send status messages.</dd>
<dt><em>1</em></dt>
<dd>Send status messages during query and I/O processing.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">34</td>
<td align="center" valign="top">22</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqdist</td>
<td align="left" valign="top">Distinct records.
<dl compact>
<dt><em>0</em></dt>
<dd>Do not produce distinct records.</dd>
<dt><em>1</em></dt>
<dd>Eliminate duplicate records from the query result.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">34</td>
<td align="center" valign="top">22</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqpgmd</td>
<td align="left" valign="top">Program-defined files.
<dl compact>
<dt><em>0</em></dt>
<dd>Ignore interactive data definition utility (IDDU) data definitions for
program-described files.</dd>
<dt><em>1</em></dt>
<dd>Use IDDU data definitions for program-described files.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">34</td>
<td align="center" valign="top">22</td>
<td align="center" valign="top">3</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqterr</td>
<td align="left" valign="top">Tolerate decimal data errors.
<dl compact>
<dt><em>0</em></dt>
<dd>Decimal data errors result in an exception being issued.</dd>
<dt><em>1</em></dt>
<dd>Decimal data errors are ignored.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">34</td>
<td align="center" valign="top">22</td>
<td align="center" valign="top">4</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqdt_2</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">34</td>
<td align="center" valign="top">22</td>
<td align="center" valign="top">5</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqintd</td>
<td align="left" valign="top">Integer division.
<dl compact>
<dt><em>0</em></dt>
<dd>Do not perform integer division.</dd>
<dt><em>1</em></dt>
<dd>Perform integer division. Division of two integer (binary) numbers produces
a zero precision result.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">34</td>
<td align="center" valign="top">22</td>
<td align="center" valign="top">6</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqdt_3</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">34</td>
<td align="center" valign="top">22</td>
<td align="center" valign="top">7</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqchgx</td>
<td align="left" valign="top">Changed files exception.
<dl compact>
<dt><em>0</em></dt>
<dd>No exception requested.</dd>
<dt><em>1</em></dt>
<dd>Send an exception when a queried file has changed since creation of the
input access plan.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">35</td>
<td align="center" valign="top">23</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqsaap</td>
<td align="left" valign="top">Precision reduction (SAA<sup>(R)</sup>)
<dl compact>
<dt><em>0</em></dt>
<dd>Allow precision reduction.</dd>
<dt><em>1</em></dt>
<dd>Disallow reduction of the precision of a derived result. Instead, reduce
significant digits when necessary.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">35</td>
<td align="center" valign="top">23</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqddmx</td>
<td align="left" valign="top">Distributed data management (DDM) files
exception.
<dl compact>
<dt><em>0</em></dt>
<dd>No exception requested.</dd>
<dt><em>1</em></dt>
<dd>Send an exception when a queried file is a DDM file.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">35</td>
<td align="center" valign="top">23</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqraut</td>
<td align="left" valign="top">Resolve authority.
<dl compact>
<dt><em>0</em></dt>
<dd>Normal authority checking. User must have corresponding data authority for
each open option.</dd>
<dt><em>1</em></dt>
<dd>Check for at least one data authority (read, add, update, or delete)
regardless of the open options.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">35</td>
<td align="center" valign="top">23</td>
<td align="center" valign="top">3</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqsqlb</td>
<td align="left" valign="top">SQL definition of binary.
<dl compact>
<dt><em>0</em></dt>
<dd>Binary fields have digits as known by the database.</dd>
<dt><em>1</em></dt>
<dd>Binary fields in SQL tables and views have 11 digits if the binary is large
and 5 digits if it is small.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">35</td>
<td align="center" valign="top">23</td>
<td align="center" valign="top">4</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqaltc</td>
<td align="left" valign="top">Alternate computation.
<dl compact>
<dt><em>0</em></dt>
<dd>Do not use alternate computation.</dd>
<dt><em>1</em></dt>
<dd>Use alternate computation. Some derivations do not overflow as fast when no
precision reduction (SAA) is allowed (qdbqsaap=1). Also, use the user-defined
result field size for one-operation derivations (+, -, *, /).</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">35</td>
<td align="center" valign="top">23</td>
<td align="center" valign="top">5</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqsubq</td>
<td align="left" valign="top">The query definition template contains at least
one subquery. This does not span across unions.</td>
</tr>
<tr>
<td align="center" valign="top">35</td>
<td align="center" valign="top">23</td>
<td align="center" valign="top">6</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqsubx</td>
<td align="left" valign="top">Subcharacters exception. This field specifies
what to do if, during CCSID compatibility processing, a conversion occurs on
the data such that information may be lost or misinterpreted.
<dl compact>
<dt><em>0</em></dt>
<dd>Allow the query to finish. Information messages are returned if this
condition occurs.</dd>
<dt><em>1</em></dt>
<dd>Send an exception.
<p>For literals and host variable values, the exception is sent during the open
operation; check the query definition template or create an access plan of the
query if subcharacters were used during the conversion of the value.</p>
<p>For fields and conversion tables, the error occurs during I/O operations on
the query if subcharacters are used.</p>
</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">35</td>
<td align="center" valign="top">23</td>
<td align="center" valign="top">7</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqdt_4</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">36</td>
<td align="center" valign="top">24</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqkunum</td>
<td align="left" valign="top">The NODUPKEY number of key fields. The database
does not return any records with duplicate keys and determines this by using
this number of key fields as a comparison length. -1 indicates that all the key
fields are used as a comparison length. This field is not applicable if field
qdbqkeyo is -1.</td>
</tr>
<tr>
<td align="center" valign="top">38</td>
<td align="center" valign="top">26</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qdbqnumrcd</td>
<td align="left" valign="top">This field is no longer supported. Its value will
be ignored.</td>
</tr>
<tr>
<td align="center" valign="top">42</td>
<td align="center" valign="top">2A</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qdbqnxqo</td>
<td align="left" valign="top">Offset to next query definition template. This
value is 0 if this is the only query definition template or if this is the last
query definition template.</td>
</tr>
<tr>
<td align="center" valign="top">46</td>
<td align="center" valign="top">2E</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qdbqtoso</td>
<td align="left" valign="top">Offset to the set operation specifications. The
set operation specifications can only be specified on the last query definition
template. <samp>0</samp> indicates that no set operation is to occur. If only
one query definition query template is specified, this offset is ignored.</td>
</tr>
<tr>
<td align="center" valign="top">50</td>
<td align="center" valign="top">32</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(4)</td>
<td align="left" valign="top">qdbqdt_5</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">54</td>
<td align="center" valign="top">36</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qdbqqdto</td>
<td align="left" valign="top">Offset to the query definition template table
containing offsets to all query definition templates between unions.</td>
</tr>
<tr>
<td align="center" valign="top">58</td>
<td align="center" valign="top">3A</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(8)</td>
<td align="left" valign="top">qdbqdt_6</td>
<td align="left" valign="top">Reserved. <a name="SPTDBQDFMT"><em>(Ref
#2.)</em></a></td>
</tr>
<tr>
<td align="center" valign="top">66</td>
<td align="center" valign="top">42</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqdfmt</td>
<td align="left" valign="top">Date format used as the preferred format for
validity checking a date string or when mapping a character field to a date.
<dl compact>
<dt><em>X'FE'</em></dt>
<dd>Job default format</dd>
<dt><em>X'01'</em></dt>
<dd>USA format</dd>
<dt><em>X'03'</em></dt>
<dd>ISO format</dd>
<dt><em>X'05'</em></dt>
<dd>EUR format</dd>
<dt><em>X'07'</em></dt>
<dd>JIS format</dd>
<dt><em>X'17'</em></dt>
<dd>MDY format</dd>
<dt><em>X'18'</em></dt>
<dd>DMY format</dd>
<dt><em>X'19'</em></dt>
<dd>YMD format</dd>
<dt><em>X'1A'</em></dt>
<dd>JUL format</dd>
</dl>
<p>When the value of this field is X'FE', the preferred format is obtained from
the job attributes, which have the value X'17', X'18', X'19', or X'1A'. <a
name="SPTDBQDSEP"><em>(Ref #3.)</em></a></p>
</td>
</tr>
<tr>
<td align="center" valign="top">67</td>
<td align="center" valign="top">43</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqdsep</td>
<td align="left" valign="top">Date separator used as the preferred format for
validity checking a date string or when mapping a character field to a date. It
is only set when field qdbqdfmt is X'FE', X'17', X'18', X'19', or X'1A'.
<dl compact>
<dt><em>X'00'</em></dt>
<dd>Job default separator</dd>
<dt><em>X'EE'</em></dt>
<dd>Implied separator</dd>
<dt><em>/</em></dt>
<dd>Slash separator</dd>
<dt><em>-</em></dt>
<dd>Dash separator</dd>
<dt><em>.</em></dt>
<dd>Period separator</dd>
<dt><em>,</em></dt>
<dd>Comma separator</dd>
<dt><em>Blank</em></dt>
<dd>Blank separator</dd>
</dl>
<p>When the value of this field is X'00', the preferred separator is obtained
from the job attributes, which are one of the previously defined values except
X'00' and X'EE'. When the value of this field is X'EE', the implied separator
for the format is used.</p>
<a name="SPTDBQTFMT"><em>(Ref #4.)</em></a></td>
</tr>
<tr>
<td align="center" valign="top">68</td>
<td align="center" valign="top">44</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqtfmt</td>
<td align="left" valign="top">The time format used as the preferred format when
validity checking a time string or when mapping a character field to a time.
<dl compact>
<dt><em>X'FE'</em></dt>
<dd>Job default format</dd>
<dt><em>X'01'</em></dt>
<dd>USA format</dd>
<dt><em>X'03'</em></dt>
<dd>ISO format</dd>
<dt><em>X'05'</em></dt>
<dd>EUR format</dd>
<dt><em>X'07'</em></dt>
<dd>JIS format</dd>
<dt><em>X'1B'</em></dt>
<dd>HMS format</dd>
</dl>
<p>When the value of this field is X'FE', the preferred format is obtained from
the job attributes, which will have the value X'1B'. <a name="SPTDBQTSEP"><em>
(Ref #5.)</em></a></p>
</td>
</tr>
<tr>
<td align="center" valign="top">69</td>
<td align="center" valign="top">45</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqtsep</td>
<td align="left" valign="top">The time separator used as the preferred
separator when validity checking a time string or when mapping a character
field to a time. It is only set when field qdbqtfmt is X'FE' or X'1B'.
<dl compact>
<dt><em>X'00'</em></dt>
<dd>Job default separator</dd>
<dt><em>X'EE'</em></dt>
<dd>Implied separator</dd>
<dt><em>.</em></dt>
<dd>Period separator</dd>
<dt><em>,</em></dt>
<dd>Comma separator</dd>
<dt><em>Blank</em></dt>
<dd>Blank separator</dd>
<dt><em>:</em></dt>
<dd>Colon separator</dd>
</dl>
<p>When the value of this field is X'00', the preferred separator is obtained
from the job attributes, which are one of the values previously defined except
X'00' and X'EE'. When the value of this field is X'EE', the implied separator
for the format is used.</p>
</td>
</tr>
<tr>
<td align="center" valign="top">70</td>
<td align="center" valign="top">46</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqcsdc</td>
<td align="left" valign="top">The coded character set identifier (CCSID)
constant tag. If nonzero, this specifies the CCSID with which the literals in
the query definition template should be tagged. If this field specifies a
single-byte character set (SBCS) CCSID and a literal has double-byte character
set (DBCS) data, the associated mixed CCSID of the SBCS CCSID is used for the
literal. Conversely, if the literal is SBCS and this field specifies a mixed or
DBCS CCSID, the associated SBCS CCSID is used for the literal.</td>
</tr>
<tr>
<td align="center" valign="top">72</td>
<td align="center" valign="top">48</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">qdbqdt_7</td>
<td align="left" valign="top">More flags.</td>
</tr>
<tr>
<td align="center" valign="top">72</td>
<td align="center" valign="top">48</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqvlit</td>
<td align="left" valign="top">Variable length literal.
<dl compact>
<dt><em>0</em></dt>
<dd>No</dd>
<dt><em>1</em></dt>
<dd>Yes</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">72</td>
<td align="center" valign="top">48</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(5)</td>
<td align="left" valign="top">qdbqdt_8</td>
<td align="left" valign="top">Reserved. <a name="SPTDBQOPTA"><em>(Ref
#6.)</em></a></td>
</tr>
<tr>
<td align="center" valign="top">72</td>
<td align="center" valign="top">48</td>
<td align="center" valign="top">6</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqopta</td>
<td align="left" valign="top">Optimize all indexes over the query files.
<dl compact>
<dt><em>0</em></dt>
<dd>The optimizer determines how many indexes to consider when optimizing the
query. The optimizer <em>times out</em> if the time spent optimizing becomes
significant when compared to the time it takes for the query to run.</dd>
<dt><em>1</em></dt>
<dd>Optimize all indexes built over the query files. This may increase the time
it takes for the optimization of the query to occur.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">72</td>
<td align="center" valign="top">48</td>
<td align="center" valign="top">7</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqmapbd</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">73</td>
<td align="center" valign="top">49</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(7)</td>
<td align="left" valign="top">qdbqdt_9</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">73</td>
<td align="center" valign="top">49</td>
<td align="center" valign="top">7</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">
<pre>
qdbq_force
_temp
</pre>
</td>
<td align="left" valign="top">Force query records to a temporary result. Note
that this is only honored if set on for the last, outermost (that is,
non-subquery) QDT of a union. It is ignored for all other QDTs of the query.
<dl compact>
<dt><em>0</em></dt>
<dd>Normal processing.</dd>
<dt><em>1</em></dt>
<dd>Force results of entire query into a temporary result.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">74</td>
<td align="center" valign="top">4A</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">QDBQDT_10</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">76</td>
<td align="center" valign="top">4C</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top"></td>
<td align="left" valign="top">qdbqfbk</td>
<td align="left" valign="top">Query feedback. The following information is
returned on successful completion of the query.</td>
</tr>
<tr>
<td align="center" valign="top">76</td>
<td align="center" valign="top">4C</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">qdbqqtyp_t</td>
<td align="left" valign="top">Query status indicators.</td>
</tr>
<tr>
<td align="center" valign="top">76</td>
<td align="center" valign="top">4C</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqtemp</td>
<td align="left" valign="top">Temporary result.
<dl compact>
<dt><em>0</em></dt>
<dd>No temporary result.</dd>
<dt><em>1</em></dt>
<dd>Temporary result created.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">76</td>
<td align="center" valign="top">4C</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqcomp</td>
<td align="left" valign="top">Selection completion.
<dl compact>
<dt><em>0</em></dt>
<dd>Selection is not complete.</dd>
<dt><em>1</em></dt>
<dd>Selection is complete.</dd>
</dl>
<p>If selection is complete, the open feedback area contains the number of
selected records. If selection is not complete, record selection may be
performed while reading the records and the open feedback may indicate more
records than are ultimately selected.</p>
</td>
</tr>
<tr>
<td align="center" valign="top">76</td>
<td align="center" valign="top">4C</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqdt_11</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">76</td>
<td align="center" valign="top">4C</td>
<td align="center" valign="top">3</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqacpi</td>
<td align="left" valign="top">Access plan indicator.
<dl compact>
<dt><em>0</em></dt>
<dd>No access plan present.</dd>
<dt><em>1</em></dt>
<dd>Query definition template is or is part of an access plan.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">76</td>
<td align="center" valign="top">4C</td>
<td align="center" valign="top">4</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqsreg</td>
<td align="left" valign="top">This field is set on if the query definition
template contains special registers CURRENT USER, CURRENT SERVER, or CURRENT
TIMEZONE.</td>
</tr>
<tr>
<td align="center" valign="top">76</td>
<td align="center" valign="top">4C</td>
<td align="center" valign="top">5</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqsubw</td>
<td align="left" valign="top">Subcharacters warning. This field specifies
whether during CCSID compatibility processing, subcharacters are used in the
query.
<dl compact>
<dt><em>0</em></dt>
<dd>No subcharacters are used.</dd>
<dt><em>1</em></dt>
<dd>Subcharacters are used in the query.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">76</td>
<td align="center" valign="top">4C</td>
<td align="center" valign="top">6</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqsqlt</td>
<td align="left" valign="top">SQL tables.
<dl compact>
<dt><em>0</em></dt>
<dd>Not all SQL tables.</dd>
<dt><em>1</em></dt>
<dd>All SQL tables.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">76</td>
<td align="center" valign="top">4C</td>
<td align="center" valign="top">7</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqlblst</td>
<td align="left" valign="top">The library list was used to determine the
referenced table. This is possible due to the use of the Override with Database
File (OVRDBF) command.</td>
</tr>
<tr>
<td align="center" valign="top">77</td>
<td align="center" valign="top">4D</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqcurdt</td>
<td align="left" valign="top">The query definition template contains CURRENT
DATE, CURRENT TIME, or CURRENT TIMESTAMP.</td>
</tr>
<tr>
<td align="center" valign="top">77</td>
<td align="center" valign="top">4D</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(7)</td>
<td align="left" valign="top">qdbqdt_12</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">78</td>
<td align="center" valign="top">4E</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(28)</td>
<td align="left" valign="top">qdbqdt_13</td>
<td align="left" valign="top">Length of query definition structure.</td>
</tr>
<tr>
<td align="center" valign="top">78</td>
<td align="center" valign="top">4E</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qdbqdtln</td>
<td align="left" valign="top">Length of query definition.</td>
</tr>
<tr>
<td align="center" valign="top">82</td>
<td align="center" valign="top">52</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(24)</td>
<td align="left" valign="top">qdbqdt_14</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">106</td>
<td align="center" valign="top">6A</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqdofmt</td>
<td align="left" valign="top">Date format for output date fields.
<dl compact>
<dt><em>X'FE'</em></dt>
<dd>Job default format</dd>
<dt><em>X'FF'</em></dt>
<dd>Format specified with based-on field.</dd>
<dt><em>X'01'</em></dt>
<dd>USA format</dd>
<dt><em>X'03'</em></dt>
<dd>ISO format</dd>
<dt><em>X'05'</em></dt>
<dd>EUR format</dd>
<dt><em>X'07'</em></dt>
<dd>JIS format</dd>
<dt><em>X'17'</em></dt>
<dd>MDY format</dd>
<dt><em>X'18'</em></dt>
<dd>DMY format</dd>
<dt><em>X'19'</em></dt>
<dd>YMD format</dd>
<dt><em>X'1A'</em></dt>
<dd>JUL format</dd>
</dl>
<p>If the data type <a href="qdbrtvfd.htm#SPTQDDFTYP">Qddfftyp</a> is unknown
(X'FFFF') and this field is X'FF', the format and separator are taken from
those specified with the based-on field. If the data type Qddfftyp is date
(X'000B'), the format and separator are taken from the extension of record
formats <a href="qdbrtvfd.htm#SPTDDFDTTF">Qddfdttf</a> and <a href=
"qdbrtvfd.htm#SPTDDFDTTS">Qddfdtts</a>. However, if Qddfdttf is X'FF', the
format and separator are taken from qdbqdofmt and qdbqdosep. If either of these
fields are not valid, it is an error. When the value of qdbqdofmt is X'FE', the
format is obtained from the job attributes, which will have the value X'17',
X'18', X'19', or X'1A'.</p>
<p>Qddfftyp, Qddfdttf, and Qddfdtts are part of the QDBRTVFD include.</p>
</td>
</tr>
<tr>
<td align="center" valign="top">107</td>
<td align="center" valign="top">6B</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqdosep</td>
<td align="left" valign="top">Date separator used as the output separator for
fields. It is only set when qdbqdofmt is X'FE', X'17', X'18', X'19', or X'1A'.
<dl compact>
<dt><em>X'00'</em></dt>
<dd>Job default separator</dd>
<dt><em>X'EE'</em></dt>
<dd>Implied separator</dd>
<dt><em>/</em></dt>
<dd>Slash separator</dd>
<dt><em>-</em></dt>
<dd>Dash separator</dd>
<dt><em>.</em></dt>
<dd>Period separator</dd>
<dt><em>,</em></dt>
<dd>Comma separator</dd>
<dt><em>Blank</em></dt>
<dd>Blank separator</dd>
</dl>
<p>When the value of this field is X'00', the separator is obtained from the
job attributes (any of the preceding values except X'00' and X'EE'). When the
value of this field is X'EE', the implied separator for the format is used.</p>
</td>
</tr>
<tr>
<td align="center" valign="top">108</td>
<td align="center" valign="top">6C</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqtofmt</td>
<td align="left" valign="top">Time format for output time fields.
<dl compact>
<dt><em>X'FE'</em></dt>
<dd>Job default format</dd>
<dt><em>X'FF'</em></dt>
<dd>Format specified with based-on field.</dd>
<dt><em>X'01'</em></dt>
<dd>USA format</dd>
<dt><em>X'03'</em></dt>
<dd>ISO format</dd>
<dt><em>X'05'</em></dt>
<dd>EUR format</dd>
<dt><em>X'07'</em></dt>
<dd>JIS format</dd>
<dt><em>X'1B'</em></dt>
<dd>HMS format</dd>
</dl>
<p>If the <a href="qdbrtvfd.htm#SPTQDDFTYP">data type Qddfftyp</a> is unknown
(X'FFFF') and this field is X'FF', the format and separator are taken from
those specified with the based-on field. If the data type Qddfftyp is time
(X'000C'), the format and separator are taken from the extension of record
formats <a href="qdbrtvfd.htm#SPTDDFDTTF">Qddfdttf</a> and <a href=
"qdbrtvfd.htm#SPTDDFDTTS">Qddfdtts</a>. However, if Qddfdttf is X'FF', the
format and separator are taken from qdbqtofmt and qdbqtosep. If either of these
fields are not valid, it is an error. When the value of qdbqtofmt is X'FE', the
format is obtained from the job attributes, which have the value X'1B'.</p>
<p>Qddfftyp, Qddfdttf, and Qddfdtts are part of the QDBRTVFD include.</p>
</td>
</tr>
<tr>
<td align="center" valign="top">109</td>
<td align="center" valign="top">6D</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqtosep</td>
<td align="left" valign="top">Time separator used as the output separator for
fields. It is only set when qdbqtofmt is X'FE' or X'1B'.
<dl compact>
<dt><em>X'00'</em></dt>
<dd>Job default separator</dd>
<dt><em>X'EE'</em></dt>
<dd>Implied separator</dd>
<dt><em>.</em></dt>
<dd>Period separator</dd>
<dt><em>,</em></dt>
<dd>Comma separator</dd>
<dt><em>:</em></dt>
<dd>Colon separator</dd>
</dl>
<p>When the value of this field is X'00', the separator is obtained from the
job attributes (any of the above values except X'00' and X'EE'). When the value
of this field is X'EE', the implied separator for the format is used.</p>
</td>
</tr>
<tr>
<td align="center" valign="top">110</td>
<td align="center" valign="top">6E</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqtsofmt</td>
<td align="left" valign="top">Timestamp format for output timestamp fields.
<dl compact>
<dt><em>X'FE'</em></dt>
<dd>Job default format</dd>
<dt><em>X'FF'</em></dt>
<dd>Format specified with based-on field</dd>
<dt><em>X'09'</em></dt>
<dd>SAA timestamp format</dd>
</dl>
<p>If the data type <a href="qdbrtvfd.htm#SPTQDDFTYP">Qddfftyp</a> is unknown
(X'FFFF') and this field is X'FF', the format and separator are taken from
those specified with the based-on field. If the data type Qddfftyp is timestamp
(X'000D'), the format and separator are taken from the extension of record
formats <a href="qdbrtvfd.htm#SPTDDFDTTF">Qddfdttf</a> and <a href=
"qdbrtvfd.htm#SPTDDFDTTS">Qddfdtts</a>. However, if Qddfdttf is X'FF', the
format and separator are taken from qdbqtsofmt and qdbqtsosep. If qdbqtsofmt
contains a format that is not valid, it is an error.</p>
<p>Qddfftyp, Qddfdttf, and Qddfdtts are part of the QDBRTVFD include.</p>
</td>
</tr>
<tr>
<td align="center" valign="top">111</td>
<td align="center" valign="top">6F</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqdt_15</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">112</td>
<td align="center" valign="top">70</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qdbq_optmrows</td>
<td align="left" valign="top">Optimization option. This field tells the
optimizer that the user does not intend to retrieve more than <em>n</em>
records from the query result. <em>n</em> can be any integer as long as it fits
in a BIN(4) type. If the optimizer optimizes for <em>n</em> records, this could
improve performance. Specifying a number does not mean the user cannot retrieve
more than <em>n</em> records. It just tells the optimizer to optimize for only
<em>n</em> records. For more information about the OPTIMIZE clause, see the <a
href="../db2/rbafzmst02.htm">DB2 UDB for iSeries SQL Reference</a> topic.</td>
</tr>
<tr>
<td align="center" valign="top">116</td>
<td align="center" valign="top">74</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(12)</td>
<td align="left" valign="top">qdbqdt_16</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">128</td>
<td align="center" valign="top">80</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qdbq_jrefo</td>
<td align="left" valign="top">Offset to JREF Join specification.</td>
</tr>
<tr>
<td align="center" valign="top">132</td>
<td align="center" valign="top">84</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(44)</td>
<td align="left" valign="top">qdbqdt_65</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">176</td>
<td align="center" valign="top">B0</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">
<pre>
qdbq_posnopts
_t
</pre>
</td>
<td align="left" valign="top">The ORed byte containing an indicator for every
scrolling option that is used for this query. Scrolling option of next is
always assumed.</td>
</tr>
<tr>
<td align="center" valign="top">176</td>
<td align="center" valign="top">B0</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">
<pre>
qdbq_posnopts
_prior
</pre>
</td>
<td align="left" valign="top">Scrolling to previous record is used.</td>
</tr>
<tr>
<td align="center" valign="top">176</td>
<td align="center" valign="top">B0</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">
<pre>
qdbq_posnopts
_first
</pre>
</td>
<td align="left" valign="top">Scrolling to first record is used.</td>
</tr>
<tr>
<td align="center" valign="top">176</td>
<td align="center" valign="top">B0</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">
<pre>
qdbq_posnopts
_last
</pre>
</td>
<td align="left" valign="top">Scrolling to last record is used.</td>
</tr>
<tr>
<td align="center" valign="top">176</td>
<td align="center" valign="top">B0</td>
<td align="center" valign="top">3</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">
<pre>
qdbq_posnopts
_before
</pre>
</td>
<td align="left" valign="top">Scrolling to before the first record is
used.</td>
</tr>
<tr>
<td align="center" valign="top">176</td>
<td align="center" valign="top">B0</td>
<td align="center" valign="top">4</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">
<pre>
qdbq_posnopts
_after
</pre>
</td>
<td align="left" valign="top">Scrolling to after the last record is used.</td>
</tr>
<tr>
<td align="center" valign="top">176</td>
<td align="center" valign="top">B0</td>
<td align="center" valign="top">5</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">
<pre>
qdbq_posnopts
_current
</pre>
</td>
<td align="left" valign="top">Retrieval of the current record is used.</td>
</tr>
<tr>
<td align="center" valign="top">176</td>
<td align="center" valign="top">B0</td>
<td align="center" valign="top">6</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">
<pre>
qdbq_posnopts
_relative
</pre>
</td>
<td align="left" valign="top">Scrolling to a record relative to the current
record is used.</td>
</tr>
<tr>
<td align="center" valign="top">176</td>
<td align="center" valign="top">B0</td>
<td align="center" valign="top">7</td>
<td align="left" valign="top">BIT(9)</td>
<td align="left" valign="top">qdbqdt_17</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">178</td>
<td align="center" valign="top">B2</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbq_ext_bits</td>
<td align="left" valign="top">Miscellaneous bits in the query definition
header.</td>
</tr>
<tr>
<td align="center" valign="top">178</td>
<td align="center" valign="top">B2</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbq_ctlblk</td>
<td align="left" valign="top">An indicator that the caller will be control
record blocking; therefore, ignore SEQONLY() overrides.</td>
</tr>
<tr>
<td align="center" valign="top">178</td>
<td align="center" valign="top">B2</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbq_norolb</td>
<td align="left" valign="top">Rollback HOLD can leave the position of this
cursor as unknown.</td>
</tr>
<tr>
<td align="center" valign="top">178</td>
<td align="center" valign="top">B2</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">
<pre>
qdbq_stream
_cursor
</pre>
</td>
<td align="left" valign="top">The user of this query attempts to read records
from this query as fast as possible.</td>
</tr>
<tr>
<td align="center" valign="top">178</td>
<td align="center" valign="top">B2</td>
<td align="center" valign="top">3</td>
<td align="left" valign="top">BIT(4)</td>
<td align="left" valign="top">qdbqdt_54</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">178</td>
<td align="center" valign="top">B2</td>
<td align="center" valign="top">7</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqdt_18</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">179</td>
<td align="center" valign="top">B3</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbq_ext_bits2</td>
<td align="left" valign="top">Miscellaneous bits in the query definition
header.</td>
</tr>
<tr>
<td align="center" valign="top">179</td>
<td align="center" valign="top">B3</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(2)</td>
<td align="left" valign="top">qdbqdt_57</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">179</td>
<td align="center" valign="top">B3</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">
<pre>
qdbq_trust
_posn
</pre>
</td>
<td align="left" valign="top">Trust scrolling option
<dl compact>
<dt><em>0</em></dt>
<dd>Query optimizer assumes that any type of cursor positioning may be
done.</dd>
<dt><em>1</em></dt>
<dd>Settings of qdbq_posnopts can be trusted. The user that built this QDT has
knowingly set the options and could experience problems if cursor positioning
not indicated is attempted. This bit should be set on with qdbq_posnopts set to
'0000'X to give the query optimizer more flexibility in choosing the best data
access method and also to enable symmetric multiprocessing (SMP) methods such
as parallel table scan and hash join.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">179</td>
<td align="center" valign="top">B3</td>
<td align="center" valign="top">3</td>
<td align="left" valign="top">BIT(5)</td>
<td align="left" valign="top">qdbqdt_58</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">180</td>
<td align="center" valign="top">B4</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbq_ext_bits3</td>
<td align="left" valign="top">Miscellaneous bits in the query definition
header.</td>
</tr>
<tr>
<td align="center" valign="top">180</td>
<td align="center" valign="top">B4</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqdt_62</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">180</td>
<td align="center" valign="top">B4</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbq_searched_ update</td>
<td align="left" valign="top">Indicator if this is a searched UPDATE QDT.</td>
</tr>
<tr>
<td align="center" valign="top">180</td>
<td align="center" valign="top">B4</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbq_searched_ delete</td>
<td align="left" valign="top">Indicator if this is a searched DELETE QDT.</td>
</tr>
<tr>
<td align="center" valign="top">180</td>
<td align="center" valign="top">B4</td>
<td align="center" valign="top">3</td>
<td align="left" valign="top">BIT(2)</td>
<td align="left" valign="top">qdbqdt_63</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">180</td>
<td align="center" valign="top">B4</td>
<td align="center" valign="top">5</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbq_drvtbl</td>
<td align="left" valign="top">Indicates that this QDT is part of a derived
table QDT.</td>
</tr>
<tr>
<td align="center" valign="top">180</td>
<td align="center" valign="top">B4</td>
<td align="center" valign="top">6</td>
<td align="left" valign="top">BIT(2)</td>
<td align="left" valign="top">qdbqdt_64</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">181</td>
<td align="center" valign="top">B5</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(15)</td>
<td align="left" valign="top">qdbqdt_19</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">196</td>
<td align="center" valign="top">C4</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">qdbpopnid</td>
<td align="left" valign="top">Optional OPENID to identify this query. *FILE
indicates the name of first or only file specified in the file specification.
You can also specify a name to associate with opened query file.</td>
</tr>
<tr>
<td align="center" valign="top">206</td>
<td align="center" valign="top">CE</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qdbspcsize</td>
<td align="left" valign="top">API users specify size for space containing all
API query definition templates. <a name="SPTQNLSS"><em>(Ref #7.)</em></a></td>
</tr>
<tr>
<td align="center" valign="top">210</td>
<td align="center" valign="top">D2</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qdbqnlss</td>
<td align="left" valign="top">Displacement to QQQNLSS_T structure (<a href=
"#HDRQQQNLSS">Sequence, Tables, Names, and Parameters (QQQNLSS_T)</a>) used for
sort sequence information. This is an offset from the beginning of the query
definition template. 0 indicates no QQQNLSS_T structure was passed. For
nonviews, if this is a union or subquery, this field is ignored unless it is
the first query definition template (for unions), or the outermost query
definition template (for subqueries).</td>
</tr>
<tr>
<td align="center" valign="top">214</td>
<td align="center" valign="top">D6</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqsrts</td>
<td align="left" valign="top">Sort sequence indicator. Possible values for this
field follow. When you use value <samp>2</samp> or <samp>3</samp>, you must
include the QQQNLSS_T structure (<a href="#HDRQQQNLSS">Sequence, Tables, Names,
and Parameters (QQQNLSS_T)</a>) at offset qdbqnlss.
<dl compact>
<dt><em>0</em></dt>
<dd>*HEX</dd>
<dt><em>2</em></dt>
<dd>The table or CCSID passed in structure QQQNLSS_T.</dd>
<dt><em>3</em></dt>
<dd>The sort sequence and language identifier passed in structure
QQQNLSS_T.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">216</td>
<td align="center" valign="top">D8</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(5)</td>
<td align="left" valign="top">qdbqdt_53</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">221</td>
<td align="center" valign="top">DD</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqic</td>
<td align="left" valign="top">Whether query allows index creation.
<dl compact>
<dt><em>N</em></dt>
<dd>Index creation is not allowed.</dd>
<dt><em>Y or X'00'</em></dt>
<dd>Index creation is allowed.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">222</td>
<td align="center" valign="top">DE</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(178)</td>
<td align="left" valign="top">qdbqdt_20</td>
<td align="left" valign="top">Reserved.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRQQQNLSS">Sequence, Tables, Names, and Parameters
(QQQNLSS_T)</a></h3>
<p>Sequence, tables, names, and parameters structure. The displacement to this
structure from the beginning of structure QDBQH_T is an entry in the table at
variable <a href="#SPTQNLSS">qdbqnlss</a>.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="13%">CHAR(42)</td>
<td align="left" valign="top" width="20%">qqqstb1</td>
<td align="left" valign="top" width="52%">Sequence table name, library name,
and language identifier.</td>
</tr>
<tr>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">qqqresv2</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">10</td>
<td align="center" valign="top">A</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(20)</td>
<td align="left" valign="top">qqsrtseq</td>
<td align="left" valign="top">Sort sequence.</td>
</tr>
<tr>
<td align="center" valign="top">10</td>
<td align="center" valign="top">A</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">qqqstbnm</td>
<td align="left" valign="top">Table name. Possible special values are:
<dl compact>
<dt><em>*JOB</em></dt>
<dd>The sort sequence of the job.</dd>
<dt><em>*LANGIDUNQ</em></dt>
<dd>The unique-weight sort sequence table that is associated with the language
identifier requested parameter.</dd>
<dt><em>*LANGIDSHR</em></dt>
<dd>The shared-weight sort sequence table that is associated with the language
identifier requested parameter.</dd>
<dt><em>*HEX</em></dt>
<dd>The sort sequence according to the hexadecimal value of the
characters.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">20</td>
<td align="center" valign="top">14</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">qqqstbnl</td>
<td align="left" valign="top">Library name. Possible special values are:
<dl compact>
<dt><em>*LIBL</em></dt>
<dd>The library list.</dd>
<dt><em>*CURLIB</em></dt>
<dd>The job's current library.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">30</td>
<td align="center" valign="top">1E</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">qqqlangid</td>
<td align="left" valign="top">Language identifier. Possible values are:
<dl compact>
<dt><em>*JOB</em></dt>
<dd>The language identifier of the job.</dd>
<dt><em>xxx</em></dt>
<dd>3-character language identifier. See <a href=
"../nls/rbagslngidsdefaultccsids.htm">Language identifiers and associated
default CCSIDs</a> for a complete list of language identifiers supported.</dd>
<dt><em>Blank</em></dt>
<dd>If blank, field qqqsrtseq cannot be *JOB, *LANGIDUNQ, or *LANGIDSHR.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">40</td>
<td align="center" valign="top">28</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">qqqresv3</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">42</td>
<td align="center" valign="top">2A</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(38)</td>
<td align="left" valign="top">qqqstb2</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">42</td>
<td align="center" valign="top">2A</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">qqqresv4</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">44</td>
<td align="center" valign="top">2C</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">qqqtbnm</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">54</td>
<td align="center" valign="top">36</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">qqqlbnm</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">64</td>
<td align="center" valign="top">40</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(14)</td>
<td align="left" valign="top">qqqresv5</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">78</td>
<td align="center" valign="top">4E</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qqqtbl_ccsid</td>
<td align="left" valign="top">Sequence table CCSID. This field is only used
when either qqqtbl is specified or qqqstboff is set for a DBCS sort sequence
table.</td>
</tr>
<tr>
<td align="center" valign="top">80</td>
<td align="center" valign="top">50</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">qqqstbe1</td>
<td align="left" valign="top">User-specified DBCS sort sequence
information.</td>
</tr>
<tr>
<td align="center" valign="top">80</td>
<td align="center" valign="top">50</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qqqstbtyp</td>
<td align="left" valign="top">Type of DBCS sort sequence table.
<dl compact>
<dt><em>X'00'</em></dt>
<dd>UCS-2 sort sequence table</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">81</td>
<td align="center" valign="top">51</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qqqstbloc</td>
<td align="left" valign="top">Location of DBCS sort sequence table.
<dl compact>
<dt><em>X'00'</em></dt>
<dd>Table is stored at qqqtbl.</dd>
<dt><em>X'01'</em></dt>
<dd>Table is stored at the DBCS sort sequence table offset (qqqstboff).</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">82</td>
<td align="center" valign="top">52</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qqqstblen</td>
<td align="left" valign="top">Length of DBCS sort sequence table. If an SBCS
sort sequence table is specified, qqqstblen must be zero.</td>
</tr>
<tr>
<td align="center" valign="top">86</td>
<td align="center" valign="top">56</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qqqstboff</td>
<td align="left" valign="top">Offset to the DBCS sort sequence table from
qqqstb1.</td>
</tr>
<tr>
<td align="center" valign="top">90</td>
<td align="center" valign="top">5A</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(22)</td>
<td align="left" valign="top">qqqresv1</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">112</td>
<td align="center" valign="top">70</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(256)</td>
<td align="left" valign="top">qqqtbl</td>
<td align="left" valign="top">User-specified sort sequence table.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRQDBQF">File Name Specification (QDBQF_T)</a></h3>
<p>File name specification. This structure defines the files, member, and
formats that are used in the query. This structure is required.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="15%"></td>
<td align="left" valign="top" width="15%">qdbqfhdr</td>
<td align="left" valign="top" width="55%">File specification header.</td>
</tr>
<tr>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqfilnum</td>
<td align="left" valign="top">The number of files, libraries, formats, and
members. <a name="SPTDBQMFOP"><em>(Ref #8.)</em></a></td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="center" valign="top">2</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqmfop</td>
<td align="left" valign="top">Multiple file option. This field is only
applicable if the qdbqfilnum field is greater than one.
<dl compact>
<dt><em>J</em></dt>
<dd>Inner join. No default values are supplied if a join value does not exist
and no record is returned.</dd>
<dt><em>C</em></dt>
<dd>Partial outer join (file chaining). Default values are supplied if a join
value does not exist.</dd>
<dt><em>E</em></dt>
<dd>Exception join. Default values are supplied if a join value does not exist.
Only records with default values are returned.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="center" valign="top">3</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqmfor</td>
<td align="left" valign="top">Multiple file order option. This field is only
applicable if field qdbqfilnum is greater than one, field qdbqmfop equals J,
and there is no file-distinct processing. For each file specified in the file
specifications, qdbqfdst equals 1. Partial-outer join, exception join, and
file-distinct processing implies no join reordering.
<dl compact>
<dt><em>A</em></dt>
<dd>Join the files in any order. The result order may vary even when rerunning
the same query.</dd>
<dt><em>N</em></dt>
<dd>Join the files in the order they are specified.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqdt_21</td>
<td align="left" valign="top">Flags.</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqmfio</td>
<td align="left" valign="top">Multiple file I/O options allowed through this
query.
<dl compact>
<dt><em>0</em></dt>
<dd>Only allow read operations against the first file in the array (always
read-only for secondary files).</dd>
<dt><em>1</em></dt>
<dd>Allow insert, update, or delete operations against the first file.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqmfjn</td>
<td align="left" valign="top">Join clause exists. An SQL JOIN clause syntax
exists in this query.</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(6)</td>
<td align="left" valign="top">qdbqdt_22</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="center" valign="top">5</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(11)</td>
<td align="left" valign="top">qdbqdt_23</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">ARRAY(32) OF CHAR(64)</td>
<td align="left" valign="top">qdbqn</td>
<td align="left" valign="top">File, library, member, and format array. This
structure is defined at QDBQN_T on <a href="#HDRQDBQN">File, Library, Member,
and Format Array (QDBQN_T)</a>.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRQDBQN">File, Library, Member, and Format Array
(QDBQN_T)</a></h3>
<p>File, library, member and format names array. This structure defines the
file, library, member, and format names that are used in the query. This
structure is required.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">CHAR(40)</td>
<td align="left" valign="top" width="20%">qdbqflmf</td>
<td align="left" valign="top" width="55%">File, library, member, and record
format names.</td>
</tr>
<tr>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">qdbqfile</td>
<td align="left" valign="top">File name. If an override is in effect to another
file, the actual file name is returned in this field.</td>
</tr>
<tr>
<td align="center" valign="top">10</td>
<td align="center" valign="top">A</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">qdbqlib</td>
<td align="left" valign="top">Library name. If the special value *LIBL is used,
the actual library name is resolved and returned in this field.</td>
</tr>
<tr>
<td align="center" valign="top">20</td>
<td align="center" valign="top">14</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">qdbqmbr</td>
<td align="left" valign="top">Member name. If the special values *FIRST or
*LAST are used, the actual member name is resolved and returned in this
field.</td>
</tr>
<tr>
<td align="center" valign="top">30</td>
<td align="center" valign="top">1E</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">qdbqfmt</td>
<td align="left" valign="top">Format name. If the special value *ONLY is used,
the actual format name is resolved and returned in this field.</td>
</tr>
<tr>
<td align="center" valign="top">40</td>
<td align="center" valign="top">28</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqfflg</td>
<td align="left" valign="top">File specification flags.</td>
</tr>
<tr>
<td align="center" valign="top">40</td>
<td align="center" valign="top">28</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqfdst</td>
<td align="left" valign="top">File-distinct flag. This field specifies, for the
records that make up the join secondaries for a join query, whether only the
first record or all records that satisfy the join conditions should participate
in the join. This flag only applies to join secondary files (files 2 through
<em>n</em>, where n equals the number of files in the join).
<dl compact>
<dt><em>0</em></dt>
<dd>All records participate.</dd>
<dt><em>1</em></dt>
<dd>Only the first record participates.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">40</td>
<td align="center" valign="top">28</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqfujn</td>
<td align="left" valign="top">Unique join fanout. This field specifies whether
the number of join records found can exceed 1. This field only applies to join
secondary files (files 2 through <em>n</em>, where n equals the number of files
in the join).
<dl compact>
<dt><em>0</em></dt>
<dd>Multiple join records are allowed.</dd>
<dt><em>1</em></dt>
<dd>Only one join-to record may be found for this file.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">40</td>
<td align="center" valign="top">28</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqfgna</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">40</td>
<td align="center" valign="top">28</td>
<td align="center" valign="top">3</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqfngn</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">40</td>
<td align="center" valign="top">28</td>
<td align="center" valign="top">4</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqnmch</td>
<td align="left" valign="top">Name change indicator
<dl compact>
<dt><em>0</em></dt>
<dd>The library, file, or member name in the specified query definition
template (at offset qdbqfilo in structure qdbqh_t, <a href="#HDRQDBQH">Query
Definition Header (QDBQH_T)</a>) did not change as a result of an
override.</dd>
<dt><em>1</em></dt>
<dd>The library, file, or member name in the specified query definition
template (at field <a href="#SPTDBQFILO">qdbqfilo</a>) changed due to an
override.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">40</td>
<td align="center" valign="top">28</td>
<td align="center" valign="top">5</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqflbo</td>
<td align="left" valign="top">Library name overridden.
<dl compact>
<dt><em>0</em></dt>
<dd>The library name in the specified query definition template (at offset
qdbqfilo in structure qdbqh_t, <a href="#HDRQDBQH">Query Definition Header
(QDBQH_T)</a>) did not change as a result of an override.</dd>
<dt><em>1</em></dt>
<dd>The library name in the specified query definition template (at offset <a
href="#SPTDBQFILO">qdbqfilo</a>) changed to *LIBL due to an override, and the
file was found using *LIBL as the library name.
<p>This bit is a feedback bit. The user of the query definition template should
not set it.</p>
</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">40</td>
<td align="center" valign="top">28</td>
<td align="center" valign="top">6</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqf_nldft</td>
<td align="left" valign="top">Null or default. The type of values to be
returned for unmatched records of a partial outer or exception join.
<dl compact>
<dt><em>0</em></dt>
<dd>Return default values</dd>
<dt><em>1</em></dt>
<dd>Return NULL values</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">40</td>
<td align="center" valign="top">28</td>
<td align="center" valign="top">7</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqdt_24</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">41</td>
<td align="center" valign="top">29</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqmfvw</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">42</td>
<td align="center" valign="top">2A</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqmfvw_spc</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">43</td>
<td align="center" valign="top">2B</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqf_qdtnum</td>
<td align="left" valign="top">Index into the array of subquery offsets
(QDBQQDT_T) for the derived table QDT.</td>
</tr>
<tr>
<td align="center" valign="top">45</td>
<td align="center" valign="top">2D</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(19)</td>
<td align="left" valign="top">QDBQDT_25</td>
<td align="left" valign="top">Reserved.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRQDBQR">Record Format Specification (QDBQR_T)</a></h3>
<p>Record format specification. This structure defines the fields that are used
in the query. The structure Qdb_Qddfmt_t is mapped by member QDBRTVFD in the
QSYSINC library. If join is specified, this specification is required.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">&nbsp;</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">CHAR(*)</td>
<td align="left" valign="top" width="20%">QDBQR</td>
<td align="left" valign="top" width="55%">Record specifications.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRQDBQJ">Join Specification (QDBQJ_T)</a></h3>
<p>Join specification. This structure defines how the files are joined by the
query. One join specification exists for the entire query definition. A join
specification entry consists of a from-field, a join operator, and a to-field.
The join specification entries can be inserted in any order with respect to the
file specifications.</p>
<p>If this is an <strong>inner join</strong> (the <a href="#SPTDBQMFOP">
qdbqmfop field</a> equals J, and no join specifications are given for a
particular to-file, the system searches the record selection specifications for
any possible implied join specifications. If no join specifications can be
derived from the record selection specifications, Cartesian product is used to
do the join.</p>
<p>All join specifications can be given in the record selection specifications.
In this case, it is not necessary to provide a join specification.</p>
<p>If this is a <strong>partial-outer</strong> or <strong>exception
join</strong> (qdbqmfop equals C or E) and no join specifications are given for
a particular to-file, the system uses Cartesian product to do the join. In
addition, only one join operator can be specified for a particular to-file.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%"></td>
<td align="left" valign="top" width="20%">qdbqjhdr</td>
<td align="left" valign="top" width="55%">Join specifications header.</td>
</tr>
<tr>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qdbqjln</td>
<td align="left" valign="top">Length of this join specification.</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqjknum</td>
<td align="left" valign="top">Number of from-join and to-join field
specifications.</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="center" valign="top">6</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">qdbqdt_26</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">ARRAY(1) OF CHAR(96)</td>
<td align="left" valign="top">qdbqjfld</td>
<td align="left" valign="top">Join specification array. Array of fields that
define the from and to fields to use when joining. The structure is defined at
QDBQJFLD_T on <a href="#HDRJFLD">Join Specification Array
(QDBQJFLD_T)</a>.</td>
</tr>
<tr>
<td align="center" valign="top">112</td>
<td align="center" valign="top">70</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">QDBQJNXT</td>
<td align="left" valign="top">Join field pair arrays. Displacement to join
specifications array from structure QDBQJ_T (see structure QDBQJFLD_T on <a
href="#HDRJFLD">Join Specification Array (QDBQJFLD_T)</a>).</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRJFLD">Join Specification Array (QDBQJFLD_T)</a></h3>
<p>Join specification array. This structure is an array of fields that define
the from and to fields to use when joining.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">CHAR(30)</td>
<td align="left" valign="top" width="20%">qdbqjfnm</td>
<td align="left" valign="top" width="55%">Join from field name.</td>
</tr>
<tr>
<td align="center" valign="top">30</td>
<td align="center" valign="top">1E</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqjfnum</td>
<td align="left" valign="top">Field join reference number. 0 indicates that the
QDBQR_T format (see <a href="#HDRQDBQR">Record Format Specification
(QDBQR_T)</a>) is searched for the external field name. If the field is not
found, the formats of the files in the file specification are searched. A value
in this field indicates that the external field name is to be found in the file
format referenced by using this value as an index into the file name
specification structure, qdbqf_t, (see <a href="#HDRQDBQF">File Name
Specification (QDBQF_T)</a>). In any case, the field found must exist in a file
joined prior to this file.</td>
</tr>
<tr>
<td align="center" valign="top">32</td>
<td align="center" valign="top">20</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">qdbqdt_27</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">34</td>
<td align="center" valign="top">22</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">qdbqjop</td>
<td align="left" valign="top">Join option.
<dl compact>
<dt><em>EQ</em></dt>
<dd>Equal</dd>
<dt><em>GT</em></dt>
<dd>Greater than</dd>
<dt><em>LT</em></dt>
<dd>Less than</dd>
<dt><em>NE</em></dt>
<dd>Not equal</dd>
<dt><em>GE</em></dt>
<dd>Greater than or equal</dd>
<dt><em>LE</em></dt>
<dd>Less than or equal</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">36</td>
<td align="center" valign="top">24</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(30)</td>
<td align="left" valign="top">qdbqjtnm</td>
<td align="left" valign="top">Join to field name. Note that only character and
any DBCS fields may be joined to character and any DBCS fields, and only
numeric fields may be joined to numeric fields. The lengths of the two fields
need not be the same. However, if they are different, a warning is sent to the
user indicating that padding occurred.</td>
</tr>
<tr>
<td align="center" valign="top">66</td>
<td align="center" valign="top">42</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqjtnum</td>
<td align="left" valign="top">Field join reference number. 0 indicates that the
QDBQR_T format (see <a href="#HDRQDBQR">Record Format Specification
(QDBQR_T)</a>) is searched for the external field name.
<p>If the field is found, it must have been completely derived from the file
associated with this join specification. If the field is not found, the format
of the file associated with this join specification is searched.</p>
<p>A value in this field indicates that the external field name is to be found
in the file format referenced by using this value as an index into the file
list. This value must reference the file associated with this join
specification.</p>
</td>
</tr>
<tr>
<td align="center" valign="top">68</td>
<td align="center" valign="top">44</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqjpfmt</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">69</td>
<td align="center" valign="top">45</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqjpsep</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">70</td>
<td align="center" valign="top">46</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqjfprf</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">70</td>
<td align="center" valign="top">46</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqjvw</td>
<td align="left" valign="top">Reserved</td>
</tr>
<tr>
<td align="center" valign="top">70</td>
<td align="center" valign="top">46</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqj_type_sup</td>
<td align="left" valign="top">Join type specified. The type of join is
specified in field qdbqj_type.</td>
</tr>
<tr>
<td align="center" valign="top">70</td>
<td align="center" valign="top">46</td>
<td align="center" valign="top">3</td>
<td align="left" valign="top">BIT(5)</td>
<td align="left" valign="top">qdbqdt_oj</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">71</td>
<td align="center" valign="top">47</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqj_type</td>
<td align="left" valign="top">Type of join.
<dl compact>
<dt><em>J</em></dt>
<dd>Inner join</dd>
<dt><em>C</em></dt>
<dd>Partial outer join</dd>
<dt><em>E</em></dt>
<dd>Exception join</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">72</td>
<td align="center" valign="top">48</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(24)</td>
<td align="left" valign="top">qdbqdt_28</td>
<td align="left" valign="top">Reserved.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRJREF">JREF Join Specification (QDBQ_JREF_T)</a></h3>
<p>JREF Join specification. This structure can be used to define the order in
which the files are to be joined. It can also be used to specify any join
selection needed to implement the join. Two files (or join results) are
specified along with the appropriate join type to be used to join together the
two operands. An offset can also be specified to the Selection Specifications
(QDBQS) that will define the join criteria that applies to the operands.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%"></td>
<td align="left" valign="top" width="20%">qdbq_jref_hdr</td>
<td align="left" valign="top" width="55%">JREF Join specifications header.</td>
</tr>
<tr>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qdbq_jref_len</td>
<td align="left" valign="top">Length of this JREF join specification.</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbq_jref#</td>
<td align="left" valign="top">Number of JREF Join entries.</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="center" valign="top">6</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">qdbqdt_66</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">qdbq_jref_spec</td>
<td align="left" valign="top">Start of the JREF Join entries. The structure is
defined at QDBQ_JREF_ENTRY_T on <a href="#HDRJREF2">JREF Join Entry
(QDBQ_JREF_ENTRY_T)</a>.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRJREF2">JREF Join Entry (QDBQ_JREF_ENTRY_T)</a></h3>
<p>JREF Join Entry.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">BIN(2)</td>
<td align="left" valign="top" width="20%">qdbq_jref_ entry_type</td>
<td align="left" valign="top" width="55%">JREF Join entry type.
<dl compact>
<dt><em>0</em></dt>
<dd>Join operand</dd>
<dt><em>2</em></dt>
<dd>Join operator</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="center" valign="top">2</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">qdbq_jref_item</td>
<td align="left" valign="top">JREF Join items. The structure is defined at
QDBQ_JREF_OPERAND_T and QDBQ_JREF_OPERATOR_T on <a href="#HDRJREF">JREF Join
Specification (QDBQ_JREF_T)</a>.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRJREF3">JREF Join Operand (QDBQ_JREF_OPERAND_T)</a></h3>
<p>JREF Join entry operand.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">BIN(2)</td>
<td align="left" valign="top" width="20%">qdbq_jref_file#</td>
<td align="left" valign="top" width="55%">JREF Join reference number. The value
in this field is used to identify the entry in the QDBQN array associated with
this file.</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="center" valign="top">2</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(8)</td>
<td align="left" valign="top">qdbqdt_67</td>
<td align="left" valign="top">Reserved.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRJREF4">JREF Join Operator (QDBQ_JREF_OPERATOR_T)</a></h3>
<p>JREF Join entry operator.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">BIN(4)</td>
<td align="left" valign="top" width="20%">qdbq_jref_jselo</td>
<td align="left" valign="top" width="55%">JREF Join entry offset. Offset to the
join selection for this JREF Join predicate. The join selection is defined by
the Selection Specifications (QDBQS).</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbq_jref_jtype</td>
<td align="left" valign="top">JREF Join type. Type of the join specified for
this JREF Join predicate.
<dl compact>
<dt><em>J</em></dt>
<dd>Inner join</dd>
<dt><em>C</em></dt>
<dd>left partial outer join</dd>
<dt><em>E</em></dt>
<dd>Exception join</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="center" valign="top">5</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(5)</td>
<td align="left" valign="top">qdbqdt_68</td>
<td align="left" valign="top">Reserved.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRQDBQS">Record Selection Specification (QDBQS_T)</a></h3>
<p>Record selection specification. This structure defines the selection
specifications for the files being queried. Selection on the file is done
before grouping. If selection is desired on group by results, see structure
QDBQGS_T on <a href="#HDRQDBQGS">Group-by-Selection Specification
(QDBQGS_T)</a>.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">BIN(4)</td>
<td align="left" valign="top" width="20%">qdbqsl</td>
<td align="left" valign="top" width="55%">Selection specifications length. This
is the total length of all selection specifications.</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqsnum</td>
<td align="left" valign="top">Number of selection specifications.</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="center" valign="top">6</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">qdbqdt_29</td>
<td align="left" valign="top">Reserved. <a name="SPTQSPEC"><em>(Ref
#9.)</em></a></td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">qdbqspec</td>
<td align="left" valign="top">Start of selection specifications. Displacement
to selection item specifications array from structure QDBQS_T (see structure
QDBQSIT_T on <a href="#HDRQSIT">Selection Item Specifications
(QDBQSIT_T)</a>).</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRQSIT">Selection Item Specifications (QDBQSIT_T)</a></h3>
<p>Selection item specifications. This structure is defined at field qdbqspec
in structure <a href="#SPTQSPEC">QDBQS_T</a>.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">BIN(4)</td>
<td align="left" valign="top" width="20%">qdbqslen</td>
<td align="left" valign="top" width="55%">Selection item length. This length
includes the length (QDBQSIT_T) plus the length of the selection item
structure.</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqsitt</td>
<td align="left" valign="top">Selection item type.
<dl compact>
<dt><em>0</em></dt>
<dd>Field operand</dd>
<dt><em>1</em></dt>
<dd>Constant operand</dd>
<dt><em>2</em></dt>
<dd>Operator</dd>
<dt><em>3</em></dt>
<dd>Subquery operand</dd>
<dt><em>4</em></dt>
<dd>Null operand (SAA). This operand is used for <samp>is null</samp> and
<samp>is not null</samp> functions. Only equal and not equal operators are
allowed.</dd>
</dl>
<a name="SPTSITM"><em>(Ref #10.)</em></a></td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="center" valign="top">6</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">qdbqsitm</td>
<td align="left" valign="top">Selection item. This field is overlaid by the
sequence of selection field structures.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRSOPF">Selection Field Operand (QDBQSOPF_T)</a></h3>
<p>Selection field operand. This structure overlays field qdbqsitm in structure
<a href="#SPTSITM">QDBQSIT_T</a>.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">CHAR(30)</td>
<td align="left" valign="top" width="20%">qdbqsofn</td>
<td align="left" valign="top" width="55%">Field name. The field name must be an
external name.</td>
</tr>
<tr>
<td align="center" valign="top">30</td>
<td align="center" valign="top">1E</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqsofj</td>
<td align="left" valign="top">Field join reference number. 0 indicates that the
QDBQR_T format (see <a href="#HDRQDBQR">Record Format Specification
(QDBQR_T)</a>) is searched for the external field name. If the field is not
found, the formats of the files in the file specification are searched. If the
field name is found in more than one file format, an error is signaled.
<p>A value in this field indicates that the external field name is to be found
in the file format referenced by using this value as an index into the file
list.</p>
</td>
</tr>
<tr>
<td align="center" valign="top">32</td>
<td align="center" valign="top">20</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqsoqt</td>
<td align="left" valign="top">Index into the query-definition-template table
for the correlated field's associated query definition template. Use zero for
noncorrelated fields.</td>
</tr>
<tr>
<td align="center" valign="top">34</td>
<td align="center" valign="top">22</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(24)</td>
<td align="left" valign="top">qdbqdt_30</td>
<td align="left" valign="top">Reserved.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRDBQSOPS">Selection Field Subquery Operand (QDBQSOPS_T)</a></h3>
<p>Selection field subquery operand. This structure overlays field qdbqsitm in
structure <a href="#SPTSITM">QDBQSIT_T</a>).</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">BIN(2)</td>
<td align="left" valign="top" width="20%">qdbqssub</td>
<td align="left" valign="top" width="55%">Index into the
query-definition-template offset table for the subquery's query definition
template.</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="center" valign="top">2</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqstyp</td>
<td align="left" valign="top">Subquery operator qualifier.
<dl compact>
<dt><em>X'00'</em></dt>
<dd>Use the <a href="#SPTDBQSOP">qdbqsop</a> field only</dd>
<dt><em>X'01'</em></dt>
<dd>ALL</dd>
<dt><em>X'02'</em></dt>
<dd>ANY or SOME</dd>
</dl>
<p>Valid values for qdbqsop when qdbqstyp equals 00 are:</p>
<dl compact>
<dt><em>Basic predicate</em></dt>
<dd>0001-0006</dd>
<dt><em>Exists</em></dt>
<dd>0045</dd>
<dt><em>In</em></dt>
<dd>0046</dd>
</dl>
<p>Valid values for qdbqsop when qdbqstyp is not equal to 00 are:</p>
<dl compact>
<dt><em>Operator</em></dt>
<dd>0001-0006</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="center" valign="top">3</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(23)</td>
<td align="left" valign="top">qdbqdt_31</td>
<td align="left" valign="top">Reserved.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRDBQSOPC">Selection Constant Operand (QDBQSOPC_T)</a></h3>
<p>Selection Constant Operand. This structure overlays field qdbqsitm in
structure <a href="#SPTSITM">QDBQSIT_T</a>.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">&nbsp;</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">CHAR (32793)</td>
<td align="left" valign="top" width="20%">qdbqsoch</td>
<td align="left" valign="top" width="55%">Constant operand header.</td>
</tr>
<tr>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">qdbqsocl</td>
<td align="left" valign="top">Constant operand byte length. This only includes
the length of the constant in field <a href="#SPTDBQSOVL">qdbqsovl</a>,
including apostrophes.</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqdt_32</td>
<td align="left" valign="top">Constant attributes.</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqsoci</td>
<td align="left" valign="top">DBCS open constant.
<dl compact>
<dt><em>0</em></dt>
<dd>This constant is not a DBCS-open literal.</dd>
<dt><em>1</em></dt>
<dd>This constant is a DBCS-open literal.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqdt_33</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqsocc</td>
<td align="left" valign="top">Character constant type.
<dl compact>
<dt><em>0</em></dt>
<dd>Character string in apostrophes. The character constant is bracketed by
apostrophes and any imbedded apostrophes must be represented by two
apostrophes.</dd>
<dt><em>1</em></dt>
<dd>Character string not in apostrophes. The character constant is not
bracketed by apostrophes.</dd>
</dl>
<p>If it is determined during query processing that the constant should be
numeric and if field qdbqsoac in this table is 0, this bit is ignored.</p>
</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">3</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqsoac</td>
<td align="left" valign="top">Character constant.
<dl compact>
<dt><em>0</em></dt>
<dd>Do not assume that this is a character constant. Determination of the type
of constant is made during query processing.</dd>
<dt><em>1</em></dt>
<dd>Assume that this is a character constant.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqsoco</td>
<td align="left" valign="top">DBCS-only constant.
<dl compact>
<dt><em>0</em></dt>
<dd>This constant is not DBCS-only.</dd>
<dt><em>1</em></dt>
<dd>This constant is DBCS-only.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">5</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqsosr</td>
<td align="left" valign="top">Special register.
<dl compact>
<dt><em>0</em></dt>
<dd>This constant operand is not a special register.</dd>
<dt><em>1</em></dt>
<dd>This constant operand is a special register, defined by the qdbqsorc
field.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">6</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqsonl</td>
<td align="left" valign="top">SAA NULL indicator.
<dl compact>
<dt><em>0</em></dt>
<dd>This constant operand is not a NULL literal.</dd>
<dt><em>1</em></dt>
<dd>This constant operand is a NULL literal.</dd>
</dl>
<p>The query definition template is synchronized with the format
description.</p>
</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">7</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqdt_34</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="center" valign="top">5</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqsorc</td>
<td align="left" valign="top">Special register constant. This field is defined
by special register constants declared in the record format definition. This
field can only be specified if field qdbqsosr is on.
<dl compact>
<dt><em>X'01'</em></dt>
<dd>User</dd>
<dt><em>X'02'</em></dt>
<dd>Current date</dd>
<dt><em>X'03'</em></dt>
<dd>Current time</dd>
<dt><em>X'04'</em></dt>
<dd>Current timestamp</dd>
<dt><em>X'05'</em></dt>
<dd>Current time zone</dd>
<dt><em>X'06'</em></dt>
<dd>Current server</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="center" valign="top">6</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqsoft</td>
<td align="left" valign="top">Date, time, timestamp, format attribute. This
field applies only to date, time, or timestamp literals.
<dl compact>
<dt><em>X'FE'</em></dt>
<dd>Job default</dd>
<dt><em>X'FF'</em></dt>
<dd>Determine format</dd>
<dt><em>X'01'</em></dt>
<dd>USA format</dd>
<dt><em>X'03'</em></dt>
<dd>ISO format</dd>
<dt><em>X'05'</em></dt>
<dd>EUR format</dd>
<dt><em>X'07'</em></dt>
<dd>JIS format</dd>
<dt><em>X'09'</em></dt>
<dd>SAA timestamp</dd>
<dt><em>X'17'</em></dt>
<dd>MDY format</dd>
<dt><em>X'18'</em></dt>
<dd>DMY format</dd>
<dt><em>X'19'</em></dt>
<dd>YMD format</dd>
<dt><em>X'1A'</em></dt>
<dd>JUL format</dd>
<dt><em>X'1B'</em></dt>
<dd>HMS format</dd>
<dt><em>X'1D'</em></dt>
<dd>YYYYNNN format</dd>
<dt><em>X'1E'</em></dt>
<dd>YYYYMMDDHHMMSS format</dd>
</dl>
<p> When the value of this field is X'FF', the format and separator specified
in the query-definition-template header (either the <a href="#SPTDBQDFMT">
qdbqdfmt</a> field or the <a href="#SPTDBQTFMT">qdbqtfmt</a> field, and either
the <a href="#SPTDBQDSEP">qdbqdsep</a> field or the <a href="#SPTDBQTSEP">
qdbqtsep</a> field, for a date or time literal is used first in determining the
format and separator of the literal.</p>
<p>When the value of this field is X'FE' for a date or time literal, the format
and separator are determined using the job attributes. The format value may be
X'17', X'18', X'19', X'1A', or X'1B'. The separator specified for <a href=
"qdbrtvfd.htm#SPTDDFDVSP">qddfdvsp</a> is used first in determining the format
and separator.</p>
<p>When the value of this field is X'FE' for a timestamp literal, the SAA
timestamp format is used as the format of the literal.</p>
</td>
</tr>
<tr>
<td align="center" valign="top">7</td>
<td align="center" valign="top">7</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqsosp</td>
<td align="left" valign="top">Date and time separator. This field applies only
to date or time literals. It should only be set when the qdbqsoft field is
X'FE', X'17', X'18', X'19', X'1A', or X'1B'.
<dl compact>
<dt><em>X'00'</em></dt>
<dd>Job default separator</dd>
<dt><em>X'EE'</em></dt>
<dd>Implied separator</dd>
<dt><em>/</em></dt>
<dd>Slash separator</dd>
<dt><em>-</em></dt>
<dd>Dash separator</dd>
<dt><em>.</em></dt>
<dd>Period separator</dd>
<dt><em>,</em></dt>
<dd>Comma separator</dd>
<dt><em>Blank</em></dt>
<dd>Blank separator</dd>
<dt><em>:</em></dt>
<dd>Colon separator</dd>
</dl>
<p>When the value of this field is X'00', the separator is obtained from the
job attributes, which will be one of the preceding values except X'00' or
X'EE'. When the value of this field is X'EE', the implied separator for the
format is used.</p>
</td>
</tr>
<tr>
<td align="center" valign="top">8</td>
<td align="center" valign="top">8</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">qdbqdt_35</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">10</td>
<td align="center" valign="top">A</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqsocd</td>
<td align="left" valign="top">CCSID value for this literal. If not set to zero,
the literal will be tagged with this CCSID. Otherwise, the literal will be
tagged with the CCSID specified in the query-definition-template header (see <a
href="#HDRQDBQH">Query Definition Header (QDBQH_T)</a>) or the job default, in
that order. This field is only valid for character, DBCS-open, DBCS-only,
DBCS-graphic, and UCS-2 literals.</td>
</tr>
<tr>
<td align="center" valign="top">12</td>
<td align="center" valign="top">C</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqdt_36</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">12</td>
<td align="center" valign="top">C</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(2)</td>
<td align="left" valign="top">qdbqdt_37</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">12</td>
<td align="center" valign="top">C</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqglit</td>
<td align="left" valign="top">An indicator that the constant is a DBCS-graphic
or UCS-2 literal. If this field is a UCS-2 literal, qdbqsocd must be set to a
valid UCS-2 CCSID, or qdbqsocd must be zero and qdbqcsdc (see <a href=
"#HDRQDBQH">Query Definition Header (QDBQH_T)</a>) must be set to a valid UCS-2
CCSID.</td>
</tr>
<tr>
<td align="center" valign="top">12</td>
<td align="center" valign="top">C</td>
<td align="center" valign="top">3</td>
<td align="left" valign="top">BIT(5)</td>
<td align="left" valign="top">qdbqdt_38</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">13</td>
<td align="center" valign="top">D</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(29)</td>
<td align="left" valign="top">QDBQDT_39</td>
<td align="left" valign="top">Reserved. <a name="SPTDBQSOVL"><em>(Ref
#11.)</em></a></td>
</tr>
<tr>
<td align="center" valign="top">42</td>
<td align="center" valign="top">2A</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR (32751)</td>
<td align="left" valign="top">qdbqsovl</td>
<td align="left" valign="top">Operand value. The operand value must be in
external form.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRDBQSOPR">Selection Operator Item (QDBQSOPR_T)</a></h3>
<p>Selection Operator Item. This structure overlays field <a href="#SPTSITM">
qdbqsitm</a> in structure <a name="SPTDBQSOP">QDBQSIT_T</a>.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">CHAR(2)</td>
<td align="left" valign="top" width="20%">qdbqsop</td>
<td align="left" valign="top" width="55%">Operators. Relational operators:
<dl compact>
<dt><em>X'0001'</em></dt>
<dd>Equal</dd>
<dt><em>X'0002'</em></dt>
<dd>Not equal</dd>
<dt><em>X'0003'</em></dt>
<dd>Greater than or equal</dd>
<dt><em>X'0004'</em></dt>
<dd>Less than or equal</dd>
<dt><em>X'0005'</em></dt>
<dd>Greater than</dd>
<dt><em>X'0006'</em></dt>
<dd>Less than</dd>
<dt><em>X'0007'</em></dt>
<dd>Range (inclusive)</dd>
<dt><em>X'0041'</em></dt>
<dd>Scan</dd>
<dt><em>X'0042'</em></dt>
<dd>Wildcard scan</dd>
<dt><em>X'0043'</em></dt>
<dd>Values</dd>
<dt><em>X'0045'</em></dt>
<dd>Exists</dd>
<dt><em>X'0046'</em></dt>
<dd>In</dd>
</dl>
<p>Boolean operators:</p>
<dl compact>
<dt><em>X'000B'</em></dt>
<dd>OR</dd>
<dt><em>X'000C'</em></dt>
<dd>XOR</dd>
<dt><em>X'000D'</em></dt>
<dd>AND</dd>
<dt><em>X'000E'</em></dt>
<dd>NOT</dd>
</dl>
<p>Case selection operators:</p>
<dl compact>
<dt><em>X'0018'</em></dt>
<dd>WHEN</dd>
<dt><em>X'001B'</em></dt>
<dd>ELSE</dd>
</dl>
Case operators are only valid when specified as part of a case selection
specification.</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="center" valign="top">2</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqswc1</td>
<td align="left" valign="top">Wildcard value for any single character. This
character indicates the value in the character string operand that should be
interpreted as matching any single character. This field is only applicable if
the qdbqsop field is a wildcard scan.</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="center" valign="top">3</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqswc2</td>
<td align="left" valign="top">Wildcard value for any number of characters. This
character indicates the value in the character string operand that should be
interpreted as matching any number of characters. This field is only applicable
if the qdbqsop field is a wildcard scan.</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqvalcnt</td>
<td align="left" valign="top">Values operand count. This count reflects the
number of selection constant operands (values) associated with the values
operator. This count must be set if the operator is values and is ignored for
all other operators.</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="center" valign="top">6</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqdt_55</td>
<td align="left" valign="top">Selection operator flags.</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="center" valign="top">6</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqescp</td>
<td align="left" valign="top">Wildcard escape character indicator. This field
is valid only for wildcard scan.
<dl compact>
<dt><em>0</em></dt>
<dd>There is no escape character.</dd>
<dt><em>1</em></dt>
<dd>There is an escape character specified for the wildcard scan operator by
using the third operand.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="center" valign="top">6</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqdt_56</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="center" valign="top">6</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqsopr_ext</td>
<td align="left" valign="top">Selection operator extension area indicator.
<dl compact>
<dt><em>0</em></dt>
<dd>Operator extension area (QDBQSOP3_T) does not exist.</dd>
<dt><em>1</em></dt>
<dd>Operator extension area (QDBQSOP3_T) exists.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="center" valign="top">6</td>
<td align="center" valign="top">3</td>
<td align="left" valign="top">BIT(5)</td>
<td align="left" valign="top">qdbqdt_60</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">7</td>
<td align="center" valign="top">7</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(3)</td>
<td align="left" valign="top">qdbqdt_40</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="left" valign="top" colspan="6"><strong>Note:</strong> The following
fields are not present in a query definition restored from a System/38.</td>
</tr>
<tr>
<td align="center" valign="top">10</td>
<td align="center" valign="top">A</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(14)</td>
<td align="left" valign="top">qdbqsop2</td>
<td align="left" valign="top">Wildcard value for double-byte characters</td>
</tr>
<tr>
<td align="center" valign="top">10</td>
<td align="center" valign="top">A</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">qdbqsdbl</td>
<td align="left" valign="top">Wildcard value for any one double-byte character.
This value indicates the value in the DBCS string operand that should be
interpreted as matching any one double-byte character. This field is only
applicable if field qdbqsop is a wildcard scan and string operand is a DBCS or
graphic pattern.</td>
</tr>
<tr>
<td align="center" valign="top">12</td>
<td align="center" valign="top">C</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">qdbqsdb2</td>
<td align="left" valign="top">Wildcard value for any number of double-byte
characters. This value indicates the value in the double-byte string operand
that should be interpreted as matching any number of double-byte or single-byte
characters. This field is only applicable if field qdbqsop is a wildcard scan
and the string operand is a DBCS or graphic pattern.</td>
</tr>
<tr>
<td align="center" valign="top">14</td>
<td align="center" valign="top">E</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(3)</td>
<td align="left" valign="top">qdbqdt_41</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">17</td>
<td align="center" valign="top">11</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">qdbqsuo1</td>
<td align="left" valign="top">Half-width wildcard value for any one double-byte
UCS-2 character. This value indicates what value in the UCS-2 operand matches
any one double-byte UCS-2 character. This field is only applicable if qdbqsop
is a wildcard scan and the pattern is a UCS-2 parameter marker, host variable
value, or constant.</td>
</tr>
<tr>
<td align="center" valign="top">19</td>
<td align="center" valign="top">13</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">qdbqsuo2</td>
<td align="left" valign="top">Full-width wildcard value for any one double-byte
UCS-2 character. This value indicates what value in the UCS-2 operand matches
any one double-byte UCS-2 character. This field is only applicable if qdbqsop
is a wildcard scan and the pattern is a UCS-2 parameter marker, host variable
value, or constant.</td>
</tr>
<tr>
<td align="center" valign="top">21</td>
<td align="center" valign="top">15</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">qdbqsum1</td>
<td align="left" valign="top">Half-width wildcard value for any number of
double-byte UCS-2 characters. This value indicates what value in the UCS-2
operand matches any number of double-byte UCS-2 characters. This field is only
applicable if qdbqsop is a wildcard scan and the pattern is a UCS-2 parameter
marker, host variable value, or constant.</td>
</tr>
<tr>
<td align="center" valign="top">23</td>
<td align="center" valign="top">17</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">qdbqsum2</td>
<td align="left" valign="top">Full-width wildcard value for any number of
double-byte UCS-2 characters. This value indicates what value in the UCS-2
operand matches any number of double-byte UCS-2 characters. This field is only
applicable if qdbqsop is a wildcard scan and the pattern is a UCS-2 parameter
marker, host variable value, or constant.</td>
</tr>
<tr>
<td align="center" valign="top">25</td>
<td align="center" valign="top">19</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqdt_59</td>
<td align="left" valign="top">Reserved.</td>
</tr>
</table>
<br>
<p><strong>Note:</strong> For the wildcard scan operator (qdbqsop=X'0042'), UTF-8 wildcard values should not be specified. If either the match operand, the pattern operand, or the escape character are UTF-8, specify both the EBCDIC equivalents (qdbqswc1, qdbqswc2, qdbqsdb1, and qdbqsdb2) and the UCS-2 equivalents (qdbqsuo1, qdbqsuo2, qdbqsum1, and qdbqsum2).
</p>
<br>
<br>
<h3><a name="HDRDBQSOP3">Selection Operator Item Extension
(QDBQSOP3_T)</a></h3>
<p>Selection Operator Item Extension. This structure overlays field qdbqsitm in
structure <a href="#SPTSITM">QDBQSIT_T</a> by following QDBQSOPR_T and is only
present if qdbqsopr_ext is set to '1'.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">BIN(2)</td>
<td align="left" valign="top" width="20%">qdbqswc_ccsid</td>
<td align="left" valign="top" width="55%">CCSID of wildcard character values
that are specified in qdbqswc1, qdbqswc2, qdbqsdb1, and qdbqsdb2. The
appropriate associated CCSID is determined depending on the CCSID of the
pattern. If needed, this CCSID is used to convert the relevant wildcard
characters to the CCSID of the pattern. If set to zero, it is assumed that the
wildcard values are in the same CCSID as that of the pattern.</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="center" valign="top">2</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqswc_ ccsid_ucs2</td>
<td align="left" valign="top">CCSID of wildcard character values that are
specified in qdbqsuo1, qdbqsuo2, qdbqsum1, and qdbqsum2. If needed, this CCSID
is used to convert the relevant wildcard characters to the CCSID of the
pattern. If this field is set to 0, it is assumed that the wildcard values are
in the same CCSID as the pattern. If this field is specified, it must be a
valid UCS-2 CCSID.</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(28)</td>
<td align="left" valign="top">qdbqdt_61</td>
<td align="left" valign="top">Reserved.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRQDBQK">Order by Specification (QDBQK_T)</a></h3>
<p>Order by specification. This structure contains a description of how the
results of the query should be ordered. Up to 10&nbsp;000 bytes may be used in
ordering.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">CHAR(16)</td>
<td align="left" valign="top" width="20%">qdbqkh</td>
<td align="left" valign="top" width="55%">Order by header.</td>
</tr>
<tr>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqknum</td>
<td align="left" valign="top">The number of key positions in the order by
specifications.</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="center" valign="top">2</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqkt</td>
<td align="left" valign="top">Key field ordering type.
<dl compact>
<dt><em>U</em></dt>
<dd>Unique key fields</dd>
<dt><em>D</em></dt>
<dd>Duplicate key fields</dd>
<dt><em>F</em></dt>
<dd>FIFO duplicate key fields</dd>
<dt><em>L</em></dt>
<dd>LIFO duplicate key fields</dd>
<dt><em>C</em></dt>
<dd>FCFO duplicate key fields</dd>
<dt><em>A, X'00'</em></dt>
<dd>Any key field is considered.</dd>
</dl>
<p>This field is only used as a guide when considering indexes. Field <a href=
"#SPTDBQOPTA">qdbqopta</a>) should be set to on to consider that all indexes
build over the query files.</p>
</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="center" valign="top">3</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(13)</td>
<td align="left" valign="top">qdbqdt_42</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">ARRAY(1) OF CHAR(64)</td>
<td align="left" valign="top">qdbqkf</td>
<td align="left" valign="top">Key specifications of 10&nbsp;000.</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(30)</td>
<td align="left" valign="top">qdbqkfld</td>
<td align="left" valign="top">Key field name. The field name must be an
external field name from the QDBQR_T format (unless QDBQR_T is not specified,
in which case the field is an external field name from the file format). For
the QDBQR_T structure, see <a href="#HDRQDBQR">Record Format Specification
(QDBQR_T)</a>. Field <a href="qdbrtvfd.htm#SPTDDFFIOB">Qddffiob</a> must not be
X'04' (<samp>neither input nor output</samp>) for a key field.</td>
</tr>
<tr>
<td align="center" valign="top">36</td>
<td align="center" valign="top">24</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qdbqksq</td>
<td align="left" valign="top">Key field sequencing attributes.</td>
</tr>
<tr>
<td align="center" valign="top">36</td>
<td align="center" valign="top">24</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqksad</td>
<td align="left" valign="top">Ascending or descending sequencing indicator.
<dl compact>
<dt><em>0</em></dt>
<dd>Ascending sequence</dd>
<dt><em>1</em></dt>
<dd>Descending sequence</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">36</td>
<td align="center" valign="top">24</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqdt_43</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">36</td>
<td align="center" valign="top">24</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qdbqkabs</td>
<td align="left" valign="top">Absolute value sequence indicator. This bit is
ignored for character key fields.
<dl compact>
<dt><em>0</em></dt>
<dd>Numeric sequence</dd>
<dt><em>1</em></dt>
<dd>Absolute value sequence</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">36</td>
<td align="center" valign="top">24</td>
<td align="center" valign="top">3</td>
<td align="left" valign="top">BIT(5)</td>
<td align="left" valign="top">qdbqdt_44</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">37</td>
<td align="center" valign="top">25</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(33)</td>
<td align="left" valign="top">qdbqdt_45</td>
<td align="left" valign="top">Reserved.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRQDBQG">Group by Specification (QDBQG_T)</a></h3>
<p>Group by specification. This structure contains a description of how the
record results of the query should be grouped. All records for which equal
values exist in the defined fields are grouped together. Up to 2000 bytes may
be used.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="20%">CHAR(16)</td>
<td align="left" valign="top" width="15%">qdbqgh</td>
<td align="left" valign="top" width="55%">Group by header.</td>
</tr>
<tr>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqgfnum</td>
<td align="left" valign="top">The number of group by fields. If the number of
group fields is 0, all the records are processed as one group.</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="center" valign="top">2</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(14)</td>
<td align="left" valign="top">qdbqdt_46</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">ARRAY(120) OF CHAR(64)</td>
<td align="left" valign="top">qdbqgf</td>
<td align="left" valign="top">Group field specification. Up to 120 fields are
allowed.</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(30)</td>
<td align="left" valign="top">qdbqgfld</td>
<td align="left" valign="top">Group field name.</td>
</tr>
<tr>
<td align="center" valign="top">46</td>
<td align="center" valign="top">2E</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqgflj</td>
<td align="left" valign="top">Field-join reference number. 0 indicates that the
QDBQR_T format (<a href="#HDRQDBQR">Record Format Specification (QDBQR_T)</a>)
is searched for the external field name. If the field is not found, the formats
of the files in the file specification are searched. If the field name is found
in more than one file format, an error is signaled. A value in this field
indicates that the external field name is found in the file format referred to
by using this value as an index into the file list.</td>
</tr>
<tr>
<td align="center" valign="top">48</td>
<td align="center" valign="top">30</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(32)</td>
<td align="left" valign="top">qdbqdt_47</td>
<td align="left" valign="top">Reserved.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRQDBQGS">Group-by-Selection Specification (QDBQGS_T)</a></h3>
<p>Group-by-selection specification. This structure defines the selection
specifications for the group by results. Selection on the group results is
performed after the selection on the record is complete and the grouping has
been completed.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">CHAR(*)</td>
<td align="left" valign="top" width="20%">QDBQGS_T</td>
<td align="left" valign="top" width="55%">Group-by-selection specification
structure. See <a href="#HDRQDBQS">Record Selection Specification
(QDBQS_T)</a>.</td>
</tr>
<tr>
<td align="center" valign="top">&nbsp;</td>
<td align="center" valign="top">&nbsp;</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">QDBQGSIT_T</td>
<td align="left" valign="top">The group by selection item specification
structure (see <a href="#HDRQSIT">Selection Item Specifications
(QDBQSIT_T)</a>).</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRQDBQT">Set Operation Specification (QDBQT_T)</a></h3>
<p>Set operation specification. This structure defines the operation
specifications being performed for each set of results generated from each
query definition template. These specifications are only valid when more than
one query definition template is specified. The set operation specifications
must only be specified on the last query definition template.</p>
<p>The specification structure is a stack of operands and operators in reverse
notation. Operands are constant literals that identify the relative position of
a query definition template among others in the query-definition-template
chain. Operators are set operators such as union. For example, given the
following query definition templates:</p>
<p><img src="RBAFX588.gif" alt="Query definition templates"></p>
<p>The following operations can be performed:</p>
<pre>
(1st QDT) UNION (2nd QDT) UNION ALL (3rd QDT)
</pre>
<br>
<br>
<p>The above can be specified in the set operation specification (in reverse
notation) as:</p>
<pre>
1 2 UNION 3 UNION ALL
</pre>
<br>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">BIN(4)</td>
<td align="left" valign="top" width="20%">qdbqtl</td>
<td align="left" valign="top" width="55%">Set specifications length. This is
the total length of all set specifications.</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqtnum</td>
<td align="left" valign="top">Number of set specifications.</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="center" valign="top">6</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">qdbqdt_48</td>
<td align="left" valign="top">Reserved. <a name="SPTDBQTSPC"><em>(Ref
#13.)</em></a></td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">qdbqtspc</td>
<td align="left" valign="top">Start of set specifications.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRDBQTIT">Set Item Specifications (QDBQTIT_T)</a></h3>
<p>Set item specifications. This structure overlays field <a href=
"#SPTDBQTSPC">qdbqtspc</a> in structure QDBQT_T.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">BIN(4)</td>
<td align="left" valign="top" width="20%">qdbqtlen</td>
<td align="left" valign="top" width="55%">Set item length. This length includes
the length (QDBQTIT_T) plus the length of the set item structure.</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqtitt</td>
<td align="left" valign="top">Set item type.
<dl compact>
<dt><em>1</em></dt>
<dd>Constant operand</dd>
<dt><em>2</em></dt>
<dd>Operator</dd>
</dl>
<a name="SPTDBQTITM"><em>(Ref #14.)</em></a></td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="center" valign="top">6</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">qdbqtitm</td>
<td align="left" valign="top">Set item. Use either table QDBQtopC_T or
QDBQtopR_T.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRDBQtopC">Relative Number of Query Definition Template
(QDBQtopC_T)</a></h3>
<p>Relative number of query definition template. This structure overlays field
qdbqtitm in structure <a href="#SPTDBQTITM">QDBQTIT_T</a> .</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">&nbsp;</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">BIN(2)</td>
<td align="left" valign="top" width="20%">qdbqtqdt</td>
<td align="left" valign="top" width="55%">Relative number of query definition
template.</td>
</tr>
<tr>
<td align="center" valign="top">&nbsp;</td>
<td align="center" valign="top">&nbsp;</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(8)</td>
<td align="left" valign="top">qdbqdt_49</td>
<td align="left" valign="top">Reserved.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRDBQTDPR">Set Operators (QDBQtopR_T)</a></h3>
<p>Set operators. This structure overlays field qdbqtitm in structure <a href=
"#SPTDBQTITM">QDBQTIT_T</a> .</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">&nbsp;</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">CHAR(2)</td>
<td align="left" valign="top" width="20%">qdbqtop</td>
<td align="left" valign="top" width="55%">Set operators.
<dl compact>
<dt><em>X'0001'</em></dt>
<dd>Union</dd>
<dt><em>X'0002'</em></dt>
<dd>Union all</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">&nbsp;</td>
<td align="center" valign="top">&nbsp;</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(8)</td>
<td align="left" valign="top">qdbqdt_50</td>
<td align="left" valign="top">Reserved.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRDBQQDTS">Query Definition Template Offset Table
(QDBQQDTS_T)</a></h3>
<p>Query definition template offset table. This structure is set for each
unioned outermost query definition template that contains subqueries. This
offset table contains offsets for addressability to each query definition
template within a union.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="12%">CHAR(16)</td>
<td align="left" valign="top" width="18%">qdbqqhdr</td>
<td align="left" valign="top" width="55%">Header.</td>
</tr>
<tr>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qdbqqdtnum</td>
<td align="left" valign="top">Number of subqueries defined with offsets.</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="center" valign="top">2</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(14)</td>
<td align="left" valign="top">qdbqdt_51</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">ARRAY(32) OF CHAR(16)</td>
<td align="left" valign="top">qdbqqdt</td>
<td align="left" valign="top">Array of subquery offsets. See structure
QDBQQDT_T (<a href="#HDRQDBQQDT">Array of Subquery Offsets (QDBQQDT_T)</a>) for
the layout.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRQDBQQDT">Array of Subquery Offsets (QDBQQDT_T)</a></h3>
<p>Array of subquery offsets.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">BIN(4)</td>
<td align="left" valign="top" width="20%">qdbqo</td>
<td align="left" valign="top" width="55%">Offset to QDT from start of first QDT
in the union.</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(12)</td>
<td align="left" valign="top">qdbqdt_52</td>
<td align="left" valign="top">Reserved.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRQFIL2">Format Definition Template (Qdb_Qddfmt_t)</a></h3>
<p>The format definition (Qdb_Qddfmt_t) for the QQQQRY API is the same
structure that is used by the Retrieve Database File Description (QDBRTVFD) API
called FILD0200. <a href="#FIGDDFMT">Qdb_Qddfmt_t Format</a> shows how this
information is organized. When more than one entry can appear, the figure
indicates this as in <strong>(2)</strong>. For a description of the fields in
Qdb_Qddfmt_t and their respective offsets, see <a href=
"qdbrtvfd.htm#HDRRTFIL2">FILD0200 Format (Qdb_Qddfmt Structure)</a> in <a href=
"qdbrtvfd.htm#HDRWWFMTD">Retrieve Database File Description (QDBRTVFD)
API</a>.</p>
<p>The description and offsets are also in the include source supplied with
i5/OS. You can see this source in member QDBRTVFD in the QSYSINC library.</p>
<p>The QQQQRY API builds the format definition if it was not created prior to
the query.</p>
<p><strong><a name="FIGDDFMT">Qdb_Qddfmt_t Format</a></strong></p>
<p><img src="RBAFX512.gif" alt="Qdb_Qddfmt_t Format"></p>
<br>
<h3><a name="HDRQDBUFCB">User File Control Block (QDBUFCB_T) Structure</a></h3>
<p>User file control block. This structure holds information from the user file
control block (UFCB). It contains selected options for the input and output of
the specified query.</p>
<p>The options available include:</p>
<ul>
<li>Sequence only</li>
<li>Commitment control</li>
<li>Block records</li>
<li>Keyed feedback</li>
<li>Record length</li>
<li>Open options</li>
<li>Release number</li>
<li>Version number</li>
<li>Invocation mark count or activation group number</li>
<li>iSeries system environment</li>
<li>Null-capable fields</li>
<li>File dependency</li>
<li>Level check</li>
<li>Record format specifications</li>
<li>Secure</li>
<li>Shared</li>
<li>Open scope</li>
</ul>
<p>In addition, some validity checking is done for this UFCB. CPF4297 is issued
if any reserved space in the header of the QDBUFCB_T format is not zero.</p>
<p>The offsets and a description of all the fields contained in this structure
are shown in the following table. You can see this source in member QQQQRY in
the QSYSINC library.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="12%">CHAR (1962)</td>
<td align="left" valign="top" width="18%">qufcb</td>
<td align="left" valign="top" width="55%">Query base UFCB. A character view of
the entire user file control block.</td>
</tr>
<tr>
<td align="center" valign="top">0</td>
<td align="center" valign="top">0</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(174)</td>
<td align="left" valign="top">reserved1</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">174</td>
<td align="center" valign="top">AE</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">shr_secure</td>
<td align="left" valign="top">Share and secure flags.</td>
</tr>
<tr>
<td align="center" valign="top">174</td>
<td align="center" valign="top">AE</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(3)</td>
<td align="left" valign="top">flglrsva</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">174</td>
<td align="center" valign="top">AE</td>
<td align="center" valign="top">3</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">flglshr</td>
<td align="left" valign="top">Share specified.
<dl compact>
<dt><em>0</em></dt>
<dd>No type of share was specified on the UFCB.</dd>
<dt><em>1</em></dt>
<dd>SHARE(YES) or SHARE(NO) was specified on the UFCB.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">174</td>
<td align="center" valign="top">AE</td>
<td align="center" valign="top">4</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">flglshsw</td>
<td align="left" valign="top">Share value.
<dl compact>
<dt><em>0</em></dt>
<dd>Not share</dd>
<dt><em>1</em></dt>
<dd>Share</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">174</td>
<td align="center" valign="top">AE</td>
<td align="center" valign="top">5</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">flglsecr</td>
<td align="left" valign="top">Secure specified.</td>
</tr>
<tr>
<td align="center" valign="top">174</td>
<td align="center" valign="top">AE</td>
<td align="center" valign="top">6</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">flglud</td>
<td align="left" valign="top">Secure value.
<dl compact>
<dt><em>0</em></dt>
<dd>Not secure</dd>
<dt><em>1</em></dt>
<dd>Secure</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">174</td>
<td align="center" valign="top">AE</td>
<td align="center" valign="top">7</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">flglsvb</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">175</td>
<td align="center" valign="top">AF</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">open</td>
<td align="left" valign="top">Open flags.</td>
</tr>
<tr>
<td align="center" valign="top">175</td>
<td align="center" valign="top">AF</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(2)</td>
<td align="left" valign="top">flagrsva</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">175</td>
<td align="center" valign="top">AF</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">flagui</td>
<td align="left" valign="top">Open input.</td>
</tr>
<tr>
<td align="center" valign="top">175</td>
<td align="center" valign="top">AF</td>
<td align="center" valign="top">3</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">flaguo</td>
<td align="left" valign="top">Open output.</td>
</tr>
<tr>
<td align="center" valign="top">175</td>
<td align="center" valign="top">AF</td>
<td align="center" valign="top">4</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">flaguu</td>
<td align="left" valign="top">Open update.</td>
</tr>
<tr>
<td align="center" valign="top">175</td>
<td align="center" valign="top">AF</td>
<td align="center" valign="top">5</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">flagud</td>
<td align="left" valign="top">Delete.</td>
</tr>
<tr>
<td align="center" valign="top">175</td>
<td align="center" valign="top">AF</td>
<td align="center" valign="top">6</td>
<td align="left" valign="top">BIT(2)</td>
<td align="left" valign="top">flagsvb</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">176</td>
<td align="center" valign="top">B0</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(4)</td>
<td align="left" valign="top">relver</td>
<td align="left" valign="top">Release and version.</td>
</tr>
<tr>
<td align="center" valign="top">176</td>
<td align="center" valign="top">B0</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">release</td>
<td align="left" valign="top">Release number. This value must be set to
01.</td>
</tr>
<tr>
<td align="center" valign="top">178</td>
<td align="center" valign="top">B2</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">version</td>
<td align="left" valign="top">Version number. This value must be set to
00.</td>
</tr>
<tr>
<td align="center" valign="top">180</td>
<td align="center" valign="top">B4</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">invmkcnt</td>
<td align="left" valign="top">Mark counter of call or activation group. Set
this field to the call mark count when scoping the open to the default
activation group. For this case, a <samp>0</samp> indicates a permanent open,
and any value greater than 0 indicates a temporary open. Set this field to the
activation group mark count when scoping the open to an activation group.
<p><strong>Note:</strong> Setting this field to the default activation group is
the same as specifying a call mark of 0 for a permanent open. This is the low-order
four bytes of the mark count value. This field needs to be concatenated with mumkctbh to
retrieve the actual invocation mark.</p>
</td>
</tr>
<tr>
<td align="center" valign="top">184</td>
<td align="center" valign="top">B8</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">markcnt</td>
<td align="left" valign="top">Mark count and blocked record.</td>
</tr>
<tr>
<td align="center" valign="top">184</td>
<td align="center" valign="top">B8</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">flg2mkcp</td>
<td align="left" valign="top">Mark counter option.
<dl compact>
<dt><em>0</em></dt>
<dd>The mark counter specified by the invmkcnt field is not used.</dd>
<dt><em>1</em></dt>
<dd>The mark counter specified by the invmkcnt field is used.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">184</td>
<td align="center" valign="top">B8</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">flg2rsvl</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">184</td>
<td align="center" valign="top">B8</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">flg2brcd</td>
<td align="left" valign="top">Blocked records.
<dl compact>
<dt><em>0</em></dt>
<dd>There are no blocked records.</dd>
<dt><em>1</em></dt>
<dd>There are blocked records.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">184</td>
<td align="center" valign="top">B8</td>
<td align="center" valign="top">3</td>
<td align="left" valign="top">BIT(5)</td>
<td align="left" valign="top">flg2rsv2</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">185</td>
<td align="center" valign="top">B9</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">reserved2</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">186</td>
<td align="center" valign="top">BA</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">invact</td>
<td align="left" valign="top">Mark count usage.</td>
</tr>
<tr>
<td align="center" valign="top">186</td>
<td align="center" valign="top">BA</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">flg4rsvl</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">186</td>
<td align="center" valign="top">BA</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">flg4iact</td>
<td align="left" valign="top">Mark counter usage.
<dl compact>
<dt><em>0</em></dt>
<dd>The mark counter specified by the invmkcnt field contains a call mark.</dd>
<dt><em>1</em></dt>
<dd>The mark counter specified by the invmkcnt field contains an activation
group number.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">186</td>
<td align="center" valign="top">BA</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(6)</td>
<td align="left" valign="top">flg4rsv2</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">187</td>
<td align="center" valign="top">BB</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">reserved2a</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">188</td>
<td align="center" valign="top">BC</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">native</td>
<td align="left" valign="top">iSeries environment and process NULLS.</td>
</tr>
<tr>
<td align="center" valign="top">188</td>
<td align="center" valign="top">BC</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(2)</td>
<td align="left" valign="top">flg3rsvl</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">188</td>
<td align="center" valign="top">BC</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">flg3ntve</td>
<td align="left" valign="top">This field must be set to 1.</td>
</tr>
<tr>
<td align="center" valign="top">188</td>
<td align="center" valign="top">BC</td>
<td align="center" valign="top">3</td>
<td align="left" valign="top">BIT(3)</td>
<td align="left" valign="top">flg3rsv2</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">188</td>
<td align="center" valign="top">BC</td>
<td align="center" valign="top">6</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">flg3null</td>
<td align="left" valign="top">Process null-capable fields.</td>
</tr>
<tr>
<td align="center" valign="top">188</td>
<td align="center" valign="top">BC</td>
<td align="center" valign="top">7</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">flg3rsv3</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">189</td>
<td align="center" valign="top">BD</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">reserved3a</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">191</td>
<td align="center" valign="top">BF</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">opnscp</td>
<td align="left" valign="top">Open scope.
<dl compact>
<dt><em>A</em></dt>
<dd>Open is scoped to the specified activation group, or if this is the default
activation group and a call mark is specified, the open is scoped to the
program at the call mark specified.</dd>
<dt><em>J</em></dt>
<dd>Open is scoped to the job.</dd>
<dt><em>X'00'</em></dt>
<dd>Not specified. The value <samp>A</samp> is assumed.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">192</td>
<td align="center" valign="top">C0</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(5)</td>
<td align="left" valign="top">reserved3b</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">197</td>
<td align="center" valign="top">C5</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">mumkctbh</td>
<td align="left" valign="top">High-order four bytes of the mark count value making a total of eight bytes. This needs to be concatenated with invmkcnt to obtain the actual invocation mark. </td>
</tr>
<tr>
<td align="center" valign="top">201</td>
<td align="center" valign="top">C9</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(7)</td>
<td align="left" valign="top">reserved3</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="left" valign="top" colspan="6"><strong>Note:</strong> The parameter
field through the ufcbend field are repeated in the variable-length data area
for each parameter.</td>
</tr>
<tr>
<td align="center" valign="top">208</td>
<td align="center" valign="top">D0</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(73)</td>
<td align="left" valign="top">parameter</td>
<td align="left" valign="top">Variable parameters.</td>
</tr>
<tr>
<td align="center" valign="top">208</td>
<td align="center" valign="top">D0</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">primrlnl</td>
<td align="left" valign="top">Primary record length. Initialize to -1 to
deactivate.</td>
</tr>
<tr>
<td align="center" valign="top">210</td>
<td align="center" valign="top">D2</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">primrlnv</td>
<td align="left" valign="top">The user-specified record length.</td>
</tr>
<tr>
<td align="center" valign="top">212</td>
<td align="center" valign="top">D4</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">filedep</td>
<td align="left" valign="top">File-dependent I/O. Initialize to -3 to
deactivate.</td>
</tr>
<tr>
<td align="center" valign="top">214</td>
<td align="center" valign="top">D6</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">fildonoff</td>
<td align="left" valign="top">File-dependent option.
<dl compact>
<dt><em>On</em></dt>
<dd>This is file dependent.</dd>
<dt><em>Off</em></dt>
<dd>This is not file dependent.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">214</td>
<td align="center" valign="top">D6</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(7)</td>
<td align="left" valign="top">fldrsvl</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">215</td>
<td align="center" valign="top">D7</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">lvlchk</td>
<td align="left" valign="top">Level-check option. Initialize to -6 to
deactivate.</td>
</tr>
<tr>
<td align="center" valign="top">217</td>
<td align="center" valign="top">D9</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">lvlonoff</td>
<td align="left" valign="top">Level-check option.
<dl compact>
<dt><em>On</em></dt>
<dd>Perform level checking</dd>
<dt><em>Off</em></dt>
<dd>Do not perform level checking</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">217</td>
<td align="center" valign="top">D9</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(7)</td>
<td align="left" valign="top">lvlrsvl</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">218</td>
<td align="center" valign="top">DA</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">recfmts</td>
<td align="left" valign="top">Record format sequence numbers for level
checking.</td>
</tr>
<tr>
<td align="center" valign="top">220</td>
<td align="center" valign="top">DC</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">maximum</td>
<td align="left" valign="top">The maximum number of formats.</td>
</tr>
<tr>
<td align="center" valign="top">222</td>
<td align="center" valign="top">DE</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">curnum</td>
<td align="left" valign="top">The current number of formats.</td>
</tr>
<tr>
<td align="center" valign="top">224</td>
<td align="center" valign="top">E0</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">ARRAY(75) of CHAR(23)</td>
<td align="left" valign="top">formats</td>
<td align="left" valign="top">Array of format names and sequence numbers</td>
</tr>
<tr>
<td align="center" valign="top">224</td>
<td align="center" valign="top">E0</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">name</td>
<td align="left" valign="top">The format name.</td>
</tr>
<tr>
<td align="center" valign="top">234</td>
<td align="center" valign="top">EA</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(13)</td>
<td align="left" valign="top">number</td>
<td align="left" valign="top">The format sequence number.</td>
</tr>
<tr>
<td align="center" valign="top">1949</td>
<td align="center" valign="top">79D</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">keyfdbk</td>
<td align="left" valign="top">Key feedback. Initialize to -53 to
deactivate.</td>
</tr>
<tr>
<td align="center" valign="top">1951</td>
<td align="center" valign="top">79F</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">keyonoff</td>
<td align="left" valign="top">Key feedback option.
<dl compact>
<dt><em>On</em></dt>
<dd>Provide feedback</dd>
<dt><em>Off</em></dt>
<dd>Do not provide feedback</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">1951</td>
<td align="center" valign="top">79F</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(7)</td>
<td align="left" valign="top">keyrsvl</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">1952</td>
<td align="center" valign="top">7A0</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">seqonly</td>
<td align="left" valign="top">Sequential processing. Initialize to -58 to
deactivate.</td>
</tr>
<tr>
<td align="center" valign="top">1954</td>
<td align="center" valign="top">7A2</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">seqonoff</td>
<td align="left" valign="top">Sequential processing option.
<dl compact>
<dt><em>On</em></dt>
<dd>Use Fast sequence processing</dd>
<dt><em>Off</em></dt>
<dd>Use standard sequence processing</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">1954</td>
<td align="center" valign="top">7A2</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">numonoff</td>
<td align="left" valign="top">Fast sequential processing option.
<dl compact>
<dt><em>On</em></dt>
<dd>Number of records to transfer to or from the I/O buffers for fast
sequential processing is specified.</dd>
<dt><em>Off</em></dt>
<dd>The number of records to transfer to or from the I/O buffers is not
specified.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">1954</td>
<td align="center" valign="top">7A2</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(6)</td>
<td align="left" valign="top">seqrsvl</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">1955</td>
<td align="center" valign="top">7A3</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">numrecs</td>
<td align="left" valign="top">The number of records to transfer to or from the
I/O buffers for fast sequential processing.</td>
</tr>
<tr>
<td align="center" valign="top">1957</td>
<td align="center" valign="top">7A5</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">commitc</td>
<td align="left" valign="top">Commitment control. Initialize to -59 to
deactivate.</td>
</tr>
<tr>
<td align="center" valign="top">1959</td>
<td align="center" valign="top">7A7</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">control</td>
<td align="left" valign="top">Commitment control and optional record-locking
level. Possible values are:
<dl compact>
<dt><em>X'00'</em></dt>
<dd>Do not place the member under commitment control when it is opened. This
would be the same as specifying the Start Commitment Control command as
STRCMTCLT COMMIT(*NO).</dd>
<dt><em>X'80'</em></dt>
<dd>Place the member under commitment control when it is opened, and use the
record-locking level default used on the Start Commitment Control command, that
is, STRCMTCTL COMMIT (*YES).</dd>
<dt><em>X'82'</em></dt>
<dd>Place the member under commitment control when it is opened and use
record-locking level *CHG, that is, STRCMTCTL COMMIT (*YES,*CHG).</dd>
<dt><em>X'86'</em></dt>
<dd>Place the member under commitment control when it is opened and use
record-locking level *CS, that is, COMMIT *YES,*CS).</dd>
<dt><em>X'87'</em></dt>
<dd>Place the member under commitment control when it is opened and use
record-locking level *ALL, that is, COMMIT (*YES,*ALL).</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">1960</td>
<td align="center" valign="top">7A8</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">ufcbend</td>
<td align="left" valign="top">This field must be set to 32767, the end of the
variable area parameters. Set this field to ENDLIST.</td>
</tr>
<tr>
<td align="center" valign="top">1962</td>
<td align="center" valign="top">7AA</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(4)</td>
<td align="left" valign="top">dummy</td>
<td align="left" valign="top">Dummy pointer to force boundary alignment for the
user file control block structure.</td>
</tr>
</table>
<br>
<br>
<h3><a name="HDRQQQVALS">Value for Query Variable Fields (QQQVALS_T)
Structure</a></h3>
<p>The structure is used to supply the values for the variable fields used by
the QQQQRY API. The offsets and a description of all the fields contained in
this structure are shown in the following table. You can see this source in
member QQQQRY in the QSYSINC library.</p>
<table border width="100%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Bit</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Variable Name</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="5%">0</td>
<td align="center" valign="top" width="5%">0</td>
<td align="center" valign="top" width="5%">&nbsp;</td>
<td align="left" valign="top" width="10%">BIN(2)</td>
<td align="left" valign="top" width="20%">qqqvvalnum</td>
<td align="left" valign="top" width="55%">Number of values in list.</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="center" valign="top">2</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(30)</td>
<td align="left" valign="top">qqqvals_l</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">32</td>
<td align="center" valign="top">20</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">ARRAY(1) OF CHAR(48)</td>
<td align="left" valign="top">qqqvlst</td>
<td align="left" valign="top">List of variable field values referenced by field
Qddfvarx. See <a href="qdbrtvfd.htm#SPTDDFVARX">field Qddfvarx</a> for the
Qddfvarx field. <a name="SPTVSPTR"><em>(Ref #15.)</em></a></td>
</tr>
<tr>
<td align="center" valign="top">32</td>
<td align="center" valign="top">20</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">Pointer</td>
<td align="left" valign="top">qqqvsptr</td>
<td align="left" valign="top">Space pointer to the host variable value. The
value must be in internal form.</td>
</tr>
<tr>
<td align="center" valign="top">48</td>
<td align="center" valign="top">30</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(7)</td>
<td align="left" valign="top">qqqvattr</td>
<td align="left" valign="top">Attributes of value.</td>
</tr>
<tr>
<td align="center" valign="top">48</td>
<td align="center" valign="top">30</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qqqvatyp</td>
<td align="left" valign="top">Scalar type
<dl compact>
<dt><em>X'00'</em></dt>
<dd>Binary</dd>
<dt><em>X'01'</em></dt>
<dd>Floating point</dd>
<dt><em>X'02'</em></dt>
<dd>Zoned decimal</dd>
<dt><em>X'03'</em></dt>
<dd>Packed</dd>
<dt><em>X'04'</em></dt>
<dd>Character</dd>
<dt><em>X'06'</em></dt>
<dd>Graphic</dd>
<dt><em>X'07'</em></dt>
<dd>DBCS-only</dd>
<dt><em>X'08'</em></dt>
<dd>DBCS-either</dd>
<dt><em>X'09'</em></dt>
<dd>DBCS-open</dd>
<dt><em>X'0B'</em></dt>
<dd>Date</dd>
<dt><em>X'0C'</em></dt>
<dd>Time</dd>
<dt><em>X'0D'</em></dt>
<dd>Timestamp</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">49</td>
<td align="center" valign="top">31</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">qqqvalen</td>
<td align="left" valign="top">Scalar length for character, binary, floating
point, only, either, or open. For graphic, this is also the number of bytes
(not characters).</td>
</tr>
<tr>
<td align="center" valign="top">49</td>
<td align="center" valign="top">31</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qqqvadec</td>
<td align="left" valign="top">Fractional digits for zoned or packed.</td>
</tr>
<tr>
<td align="center" valign="top">50</td>
<td align="center" valign="top">32</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qqqvatot</td>
<td align="left" valign="top">Total digits for zoned or packed.</td>
</tr>
<tr>
<td align="center" valign="top">51</td>
<td align="center" valign="top">33</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(4)</td>
<td align="left" valign="top">qqqvaary</td>
<td align="left" valign="top">Container for precision and digits for binary
values.</td>
</tr>
<tr>
<td align="center" valign="top">51</td>
<td align="center" valign="top">33</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qqqvbind</td>
<td align="left" valign="top">Fractional digits for binary value.</td>
</tr>
<tr>
<td align="center" valign="top">52</td>
<td align="center" valign="top">34</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qqqvbint</td>
<td align="left" valign="top">Total digits for binary value.</td>
</tr>
<tr>
<td align="center" valign="top">53</td>
<td align="center" valign="top">35</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">qqqvals_2</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">55</td>
<td align="center" valign="top">37</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qqqvals_3</td>
<td align="left" valign="top">Field attributes.</td>
</tr>
<tr>
<td align="center" valign="top">55</td>
<td align="center" valign="top">37</td>
<td align="center" valign="top">0</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qqqvvlen</td>
<td align="left" valign="top">Variable length host variable field.
<dl compact>
<dt><em>0</em></dt>
<dd>The host variable field is not variable length.</dd>
<dt><em>1</em></dt>
<dd>The host variable field is variable length.</dd>
</dl>
</td>
</tr>
<tr>
<td align="center" valign="top">55</td>
<td align="center" valign="top">37</td>
<td align="center" valign="top">1</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qqqvnulll</td>
<td align="left" valign="top">The form of field <a href="#SPTVSPTR">
qqqvsptr</a>. If on, qqqvsptr is ignored and the literal is the null value. If
off, the literal pointed to by qqqvsptr is used.</td>
</tr>
<tr>
<td align="center" valign="top">55</td>
<td align="center" valign="top">37</td>
<td align="center" valign="top">2</td>
<td align="left" valign="top">BIT(1)</td>
<td align="left" valign="top">qqqvzerol</td>
<td align="left" valign="top">The length of field qqqvsptr. If on, qqqvsptr is
ignored and the literal is zero length. If off, the literal pointed to by
qqqvsptr is used.</td>
</tr>
<tr>
<td align="center" valign="top">55</td>
<td align="center" valign="top">37</td>
<td align="center" valign="top">3</td>
<td align="left" valign="top">BIT(5)</td>
<td align="left" valign="top">qqqvals_4</td>
<td align="left" valign="top">Reserved.</td>
</tr>
<tr>
<td align="center" valign="top">56</td>
<td align="center" valign="top">38</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qqqvdvft</td>
<td align="left" valign="top">Date, time, and timestamp format attribute. This
field applies to date, time, or timestamp values only, where the field qqqvatyp
in this structure is date, time, or timestamp.
<dl compact>
<dt><em>X'00'</em></dt>
<dd>Job default</dd>
<dt><em>X'FF'</em></dt>
<dd>Determine format</dd>
<dt><em>X'01'</em></dt>
<dd>USA format</dd>
<dt><em>X'03'</em></dt>
<dd>ISO format</dd>
<dt><em>X'05'</em></dt>
<dd>EUR format</dd>
<dt><em>X'07'</em></dt>
<dd>JIS format</dd>
<dt><em>X'09'</em></dt>
<dd>SAA timestamp</dd>
<dt><em>X'17'</em></dt>
<dd>MDY format</dd>
<dt><em>X'18'</em></dt>
<dd>DMY format</dd>
<dt><em>X'19'</em></dt>
<dd>YMD format</dd>
<dt><em>X'1A'</em></dt>
<dd>JUL format</dd>
<dt><em>X'1B'</em></dt>
<dd>HMS format</dd>
<dt><em>X'1D'</em></dt>
<dd>YYYY NNN format</dd>
<dt><em>X'1E'</em></dt>
<dd>YYYY MM DDDD HH MM SS format</dd>
</dl>
These formats are optional. If the value is X'FF', the format is in the query
definition template header and that format is used first in determining the
format. See <a href="#SPTDBQDFMT">field qdbqdfmt</a> or <a href="#SPTDBQTFMT">
field qdbqtfmt</a> if the format is in the query definition template
header.</td>
</tr>
<tr>
<td align="center" valign="top">57</td>
<td align="center" valign="top">39</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">qqqvdvsp</td>
<td align="left" valign="top">Date, time, and timestamp separator. This field
is only set when field qqqvdvft in this structure is X'17', X'18', X'19',
X'1A', or X'1B'.</td>
</tr>
<tr>
<td align="center" valign="top">58</td>
<td align="center" valign="top">3A</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">BIN(2)</td>
<td align="left" valign="top">qqqvcsid</td>
<td align="left" valign="top">CCSID of value.</td>
</tr>
<tr>
<td align="center" valign="top">59</td>
<td align="center" valign="top">3C</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(20)</td>
<td align="left" valign="top">qqqvals_5</td>
<td align="left" valign="top">Reserved.</td>
</tr>
</table>
<br>
<br>
<h3><a name="usage_notes">Usage Notes</a></h3>
<p>In multithreaded jobs, this command is not threadsafe for distributed files
and fails for distributed files that use relational databases of type *SNA.
This command also is not threadsafe and fails for Distributred Data Management
(DDM) files of type *SNA.</p>
<br>
<h3>Error Messages</h3>
<table width="100%" cellpadding="5">
<!-- cols="15 85" -->
<tr>
<th align="left" valign="top" nowrap>Message ID</th>
<th align="left" valign="top">Error Message Text</th>
</tr>
<tr>
<td align="left" valign="top">CPF2114 E</td>
<td align="left" valign="top">Cannot allocate object &amp;1 in &amp;2 type
*&amp;3.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2115 E</td>
<td align="left" valign="top">Object &amp;1 in &amp;2 type *&amp;3
damaged.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2169 E</td>
<td align="left" valign="top">Job's sort sequence information not
available.</td>
</tr>
<tr>
<td align="left" valign="top">CPF24B4 E</td>
<td align="left" valign="top">Severe error while addressing parameter
list.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2619 E</td>
<td align="left" valign="top">Table &amp;1 not found.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3BCC E</td>
<td align="left" valign="top">Language identifier &amp;1 not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3BC6 E</td>
<td align="left" valign="top">Sort sequence &amp;1 not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3BC7 E</td>
<td align="left" valign="top">CCSID &amp;1 outside of valid range.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3BC8 E</td>
<td align="left" valign="top">Conversion from CCSID &amp;1 to CCISID &amp;2 is
not supported.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3BC9 E</td>
<td align="left" valign="top">Conversion from CCSID &amp;1 to CCISID &amp;2 is
not defined.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C90 E</td>
<td align="left" valign="top">Literal value cannot be changed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3CF1 E</td>
<td align="left" valign="top">Error code parameter is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3FC0 E</td>
<td align="left" valign="top">Language identifier is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF4000 E</td>
<td align="left" valign="top">All CPF40xx messages could be returned. xx is
from 01 to FF.</td>
</tr>
<tr>
<td align="left" valign="top">CPF4100 E</td>
<td align="left" valign="top">All CPF41xx messages could be returned. xx is
from 01 to FF.</td>
</tr>
<tr>
<td align="left" valign="top">CPF4200 E</td>
<td align="left" valign="top">All CPF42xx messages could be returned. xx is
from 01 to FF.</td>
</tr>
<tr>
<td align="left" valign="top">CPF4300 E</td>
<td align="left" valign="top">All CPF43xx messages could be returned. xx is
from 01 to FF.</td>
</tr>
<tr>
<td align="left" valign="top">CPF5000 E</td>
<td align="left" valign="top">All CPF50xx messages could be returned. xx is
from 01 to FF.</td>
</tr>
<tr>
<td align="left" valign="top">CPF5100 E</td>
<td align="left" valign="top">All CPF51xx messages could be returned. xx is
from 01 to FF.</td>
</tr>
<tr>
<td align="left" valign="top">CPF5200 E</td>
<td align="left" valign="top">All CPF52xx messages could be returned. xx is
from 01 to FF.</td>
</tr>
<tr>
<td align="left" valign="top">CPF5300 E</td>
<td align="left" valign="top">All CPF53xx messages could be returned. xx is
from 01 to FF.</td>
</tr>
<tr>
<td align="left" valign="top">CPF8133 E</td>
<td align="left" valign="top">Table &amp;4 in &amp;9 damaged.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9800 E</td>
<td align="left" valign="top">All CPF98xx messages could be signaled. xx is
from 01 to FF.</td>
</tr>
</table>
<br>
<br>
<h3>Example</h3>
<p>See <a href="../apiref/aboutapis.htm#codedisclaimer">Code disclaimer information</a>
for information pertaining to code examples.</p>
<p>For examples that use the QQQQRY API, see <a href="../apiref/apiexdefque.htm">
Defining Queries</a> in the Examples: APIs topic.</p>
<br>
<hr>
API introduced: V2R2
<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>
</body>
</html>