ibm-information-center/dist/eclipse/plugins/i5OS.ic.ddp_5.4.0.1/rbal1nondefault.htm

114 lines
5.4 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="Implicit connection management for nondefault activation groups" />
<meta name="abstract" content="The application requester can implicitly connect to an application server." />
<meta name="description" content="The application requester can implicitly connect to an application server." />
<meta name="DC.Relation" scheme="URI" content="rbal1cnct.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbal1nondefault" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Implicit connection management for nondefault activation groups</title>
</head>
<body id="rbal1nondefault"><a name="rbal1nondefault"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Implicit connection management for nondefault activation groups</h1>
<div><p>The application requester can implicitly connect to an application
server.</p>
<div class="section"><p>Implicit connection occurs when the application requester detects
the first SQL statement issued for the activation group and it is not a CONNECT
statement with parameters.</p>
<p>For a distributed program, the implicit connection
is made to the relational database specified on the RDB parameter. For a nondistributed
program, the implicit connection is made to the local relational database.</p>
</div>
<div class="section"><p>Implicit disconnection can occur at the following parts of a process:
</p>
<ul><li>When the activation group ends, if commitment control is not active, activation
group level commitment control is active, or the job level commitment definition
is at a unit of work boundary. <p>If the job level commitment definition
is active and not at a unit of work boundary then SQL is placed in the exited
state.</p>
</li>
<li>If SQL is in the exited state, when the job level commitment definition
is committed or rolled back.</li>
<li>At the end of a job.</li>
</ul>
</div>
<div class="section"><p>The following example program is not distributed (no connection
is required). It is a program run at a Spiffy Corporation regional office
to gather local repair information into a report. </p>
</div>
<div class="section"><div class="note"><span class="notetitle">Note:</span> By using the code examples, you agree to the terms of the <a href="codedisclaimer.htm">Code license and disclaimer information</a>.</div>
<pre>CRTSQL<em>xxx</em> PGM(SPIFFY/FIXTOTAL) COMMIT(*CHG) RDB(*NONE)
PROC: FIXTOTAL;
.
.
.
SELECT * INTO :SERVICE <strong><span>A</span></strong>
FROM REPAIRTOT;
EXEC SQL
COMMIT;
.
.
.
END FIXTOTAL;</pre>
</div>
<div class="section"> <dl><dt class="dlterm"><strong><span>A</span></strong></dt>
<dd>Statement run on the local relational database</dd>
</dl>
</div>
<div class="section"><p>Another program, such as the following example, can gather the
same information from Spiffy dealerships in the Kansas City region. This is
an example of a distributed program that is implicitly connected and disconnected:
</p>
<pre>CRTSQL<em>xxx</em> PGM(SPIFFY/FIXES) COMMIT(*CHG) RDB(KC101) RDBCNNMTH(*RUW)
PROC: FIXES;
.
.
.
EXEC SQL
SELECT * INTO :SERVICE <strong><span>B</span></strong>
FROM SPIFFY.REPAIR1;
EXEC SQL <strong><span>C</span></strong>
COMMIT;
.
.
.
END FIXES; <strong><span>D</span></strong></pre>
<dl><dt class="dlterm"><strong><span>B</span></strong></dt>
<dd>Implicit connection to application server (AS). The statement
runs on the AS.</dd>
<dt class="dlterm"><strong><span>C</span></strong></dt>
<dd>End of unit of work. The application requester (AR) is placed in a connectable
and connected state if the COMMIT is successful.</dd>
<dt class="dlterm"><strong><span>D</span></strong></dt>
<dd>Implicit disconnection at the end of the SQL program.</dd>
</dl>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal1cnct.htm" title="What makes a distributed relational database application distributed is its ability to connect to a relational database on another server.">Connect to a distributed relational database</a></div>
</div>
</div>
</body>
</html>