ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzakj_5.4.0.1/rzakjusenotify.htm

109 lines
7.9 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="concept" />
<meta name="DC.Title" content="Example: Use a notify object to start an application" />
<meta name="abstract" content="When a program is started after an abnormal end, it can look for an entry in the notify object. If the entry exists, the program can start a transaction again. After the transaction has been started again, the notify object is cleared by the program to prevent it from starting the same transaction yet another time." />
<meta name="description" content="When a program is started after an abnormal end, it can look for an entry in the notify object. If the entry exists, the program can start a transaction again. After the transaction has been started again, the notify object is cleared by the program to prevent it from starting the same transaction yet another time." />
<meta name="DC.Relation" scheme="URI" content="rzakjscenario.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakjnotifyeach.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakjnotifyall.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakjnotify.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2004, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2004, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzakjusenotify" />
<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>Example: Use a notify object to start an application</title>
</head>
<body id="rzakjusenotify"><a name="rzakjusenotify"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Example: Use a notify object to start an application</h1>
<div><p>When a program is started after an abnormal end, it can look for
an entry in the notify object. If the entry exists, the program can start
a transaction again. After the transaction has been started again, the notify
object is cleared by the program to prevent it from starting the same transaction
yet another time.</p>
<p>Here are ways to use a notify object:</p>
<ul><li>If the commit identification is placed in a database file, query this
file to determine where to start each application or workstation job again.</li>
<li>If the commit identification is placed in a message queue for a particular
workstation, a message can be sent to the work station users when they sign
on to inform them of the last transaction committed.</li>
<li>If the commit identification is placed in a database file that has a key
or user name, the program can read this file when it is started. If a record
exists in the file, start the program again. The program can send a message
to the workstation user identifying the last transaction committed. Any recovery
is performed by the program. If a record existed in the database file, the
program deletes that record at the end of the program.</li>
<li>For a batch application, the commit identification can be placed in a
data area that contains totals, switch settings, and other status information
necessary to start the application again. When the application is started,
it accesses the data area and verifies the values stored there. If the application
ends normally, the data area is set up for the next run.</li>
<li>For a batch application, the commit identification can be sent to a message
queue. A program that is run when the application is started can retrieve
the messages from the queue and start the programs again.</li>
</ul>
<p>You can use several techniques for starting your applications
again, depending on your application needs. In choosing the technique, consider
the following information:</p>
<ul><li>When there are multiple users of a program at the same time, a single
data area cannot be used as the notify object because after an abnormal system
end, the commit identification for each user will overlay each other in the
data area.</li>
<li>Your design for deleting information in the notify object must handle
the situation when a failure occurs immediately following use
of the information: <ul><li>If information is deleted immediately, it does not exist if another failure
occurs before processing the interrupted transaction.</li>
<li>The information in the notify object must not be deleted until the successful
processing of the interrupted transaction. In this case, more than one entry
will exist in the notify object if it is a database file or message queue.</li>
<li>The program must access the last record if there is more than one entry.</li>
</ul>
</li>
<li>A notify object cannot be used to provide the work station user with the
last transaction committed because the notify object is updated only if a
system or job failure occurs or if uncommitted changes exist at the normal
end of a job.</li>
<li>If information is displayed to the workstation user, it must be meaningful.
This might require that the program translate codes kept in the notify object
into information that will help the user start again.</li>
<li>Information for starting again must be displayed if the work station user
needs it. Additional logic in the program is required to prevent information
from being displayed again when it is no longer meaningful.</li>
<li>A single notify object and a standard processing program can provide a
starting again function if the notify object is a database file. This standard
processing program is called by the programs that require the ability to start
again to minimize the changes to each individual program.</li>
</ul>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rzakjnotifyeach.htm">Example: Unique notify object for each program</a></strong><br />
Using a single, unique notify object for each job allows use of an externally described commit identification even though there might be multiple users of the same program.</li>
<li class="ulchildlink"><strong><a href="rzakjnotifyall.htm">Example: Single notify object for all programs</a></strong><br />
Using a single notify object for all programs is advantageous because all information required to start again is in the same object and a standard approach to the notify object can be used in all programs. In this situation, use a unique combination of user and program identifications to make sure that the program accesses the correct information when it starts again.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakjscenario.htm" title="You can read scenarios and examples in this topic to see how one company sets up commitment control. Read code examples for programs that use commitment control.">Scenarios and examples: Commitment control</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rzakjnotify.htm" title="A notify object is a message queue, data area, or database file that contains information identifying the last successful transaction completed for a particular commitment definition if that commitment definition did not end normally.">Commit notify object</a></div>
</div>
</div>
</body>
</html>