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

62 lines
4.0 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="End DRDA units of work" />
<meta name="abstract" content="You should be careful about ending SQL programs with uncommitted work. When a program ends with uncommitted work, the connection to the relational database remains active." />
<meta name="description" content="You should be careful about ending SQL programs with uncommitted work. When a program ends with uncommitted work, the connection to the relational database remains active." />
<meta name="DC.subject" content="ending SQL programs, SQL programs, ending" />
<meta name="keywords" content="ending SQL programs, SQL programs, ending" />
<meta name="DC.Relation" scheme="URI" content="rbal1progdrd.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="rbal1enddrda" />
<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>End DRDA units
of work</title>
</head>
<body id="rbal1enddrda"><a name="rbal1enddrda"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">End DRDA<sup>®</sup> units
of work</h1>
<div><p>You should be careful about ending SQL programs with uncommitted
work. When a program ends with uncommitted work, the connection to the relational
database remains active.</p>
<div class="section"><p>However, in some cases involving programs running in system-named
activation groups, the system performs an automatic commit operation when
the program ends.</p>
</div>
<div class="section"><p>This behavior differs from that of other systems because in the <span class="keyword">i5/OS™</span> operating system, COMMITs
and ROLLBACKs can be used as commands from the command line or in a CL program.
However, the preceding scenario can lead to unexpected results in the next
SQL program run, unless you plan for the situation. For example, if you run
Interactive SQL next (<span class="cmdname">STRSQL</span> command), the interactive
session starts up in the state of being connected to the previous application
server (AS) with uncommitted work. As another example, if following the preceding
scenario, you start a second SQL program that does an implicit connection,
an attempt is made to find and run a package for it on the AS that was last
used. This might not be the AS that you intended. To avoid these surprises
always commit or rollback the last unit of work before ending any application
program.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal1progdrd.htm" title="Programming considerations for a distributed relational database application on an iSeries server fall into two main categories: those that deal with a function that is supported on the local server and those that are a result of having to connect to other servers.">Programming considerations for a distributed relational database application</a></div>
</div>
</div>
</body>
</html>