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

193 lines
5.5 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
<title>Change Dynamic Default Collection (QSQCHGDC) 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. -->
<!-- QSQCHGDC SCR450 A converted by B2H R4.1 (346) (CMS) by V2DCIJB -->
<!-- at RCHVMW2 on 2 Oct 1999 at 12:46:02 -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!--File Edited March 2001 -->
<!-- This file has undergone html cleanup on 9/19/01 by JET -->
<!--End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<a name="top_Of_Page"></a>
<!-- Java sync-link -->
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
</script>
<h2>Change Dynamic Default Collection (QSQCHGDC) API</h2>
<br>
<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%">Default collection name</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Char(18)</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Optional or Omissible Parameter:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">2</td>
<td align="left" valign="top" width="50%">Error code</td>
<td align="left" valign="top" width="20%">I/O</td>
<td align="left" valign="top" width="20%">Char(*)</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Yes<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Change Dynamic Default Collection (QSQCHGDC) API defines a default
collection for unqualified table names in dynamically prepared statements or in
dynamically executed statements. The default collection is defined only for the
job issuing the API call. The default collection will take precedence over the
naming convention and default collection specified when the SQL program was
created.</p>
<br>
<h3>Authorities and Locks</h3>
<p>None.</p>
<br>
<h3>Required Parameter</h3>
<dl>
<dt><strong>Default collection name</strong></dt>
<dd>INPUT; CHAR(18)
<p>The name of the default collection. The following values are allowed:</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>*CURLIB</em></td>
<td align="left" valign="top">The current library at the time the API is called
is used as the default collection. Subsequent changes of the current library
will not change the default collection. If no current library is defined,
library QGPL is used.</td>
</tr>
<tr>
<td align="left" valign="top"><em>*PGM</em></td>
<td align="left" valign="top">The default collection is determined by the attributes
specified when the SQL program was created. If DYNDFTCOL(*YES) was specified,
the default collection is the library name specified on the DFTRDBCOL keyword.
If DYNDFTCOL(*NO) was specified, dynamically prepared and executed statements
will use the default collection rules based on the naming convention. For
further information on naming conventions, see the <a href="../db2/rbafzmst02.htm">
DB2 Universal Database for iSeries SQL Reference</a>.</td>
</tr>
<tr>
<td align="left" valign="top" nowrap><em>default collection name</em></td>
<td align="left" valign="top">The name of the default collection. This value must be
uppercase and not delimited.</td>
</tr>
</table>
<p>The API does not validate the existence or the user's authority to the
specified default collection. These validations occur on the execution of
subsequent SQL prepare or execute operations.</p>
</dd>
</dl>
<br>
<h3>Optional or Omissible Parameter</h3>
<dl>
<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>. If this
parameter is omitted, diagnostic and escape messages are issued to the
application.</p>
</dd>
</dl>
<br>
<h3>Usage Notes</h3>
<ol>
<li>If a package is created with a DFTRDBCOL, QSQCHGDC has no effect.<br>
<br>
</li>
<li>In V5R2, the scope of QSQCHGDC was changed from job scoped to activation
group scoped.</li>
</ol>
<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 width="15%" valign="top">CPF3CF1 E</td>
<td width="85%" valign="top">Error code parameter not valid.</td>
</tr>
<tr>
<td valign="top">CPF9872 E</td>
<td valign="top">Program or service program &amp;1 in library &amp;2 ended.
Reason code &amp;3.</td>
</tr>
</table>
<br>
<hr>
API introduced: V4R5
<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>