ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaks_5.4.0.1/rzaksjobendcontrolled.htm

83 lines
5.6 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?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="End a job: controlled" />
<meta name="abstract" content="Ending a job in a controlled manner allows programs that are running in the job to perform their end-of-job cleanup. A delay time can be specified to allow the job to end in a controlled manner. If the delay time ends before the job ends, the job is ended immediately." />
<meta name="description" content="Ending a job in a controlled manner allows programs that are running in the job to perform their end-of-job cleanup. A delay time can be specified to allow the job to end in a controlled manner. If the delay time ends before the job ends, the job is ended immediately." />
<meta name="DC.Relation" scheme="URI" content="rzakshowendjob.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakshowsbsstop.htm" />
<meta name="DC.Relation" scheme="URI" content="../rzakz/rzakzqendjoblmt.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="rzaksjobendcontrolled" />
<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 a job: controlled</title>
</head>
<body id="rzaksjobendcontrolled"><a name="rzaksjobendcontrolled"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">End a job: controlled</h1>
<div><p>Ending a job in a controlled manner allows programs that are running
in the job to perform their end-of-job cleanup. A delay time can be specified
to allow the job to end in a controlled manner. If the delay time ends before
the job ends, the job is ended immediately.</p>
<div class="p">Any application that needs to perform end-of-job cleanup should detect
when the job is ending in a controlled manner. There are three ways an application
can detect this:<dl><dt class="dlterm">Synchronously retrieve End Status</dt>
<dd>At certain points, an application can synchronously check the End Status
of the job in which it is running. You can retrieve the job's end status by
issuing the Retrieve Job Attributes (<span class="cmdname">RTVJOBA</span>) CL command.
Additionally, you can use one of several APIs that retrieve the job's end
status. You can find more information about these APIs in the experience report, <cite>Work
management job attributes</cite></dd>
</dl>
<dl><dt class="dlterm">Synchronously check major and minor return codes after an I/O operation</dt>
<dd>For both display I/O and ICF communications I/O, a major return code of
02, or a major return code of 03 with a minor return code of 09 indicates
the job is ending in a controlled manner. </dd>
</dl>
<dl><dt class="dlterm">Handle the asynchronous signal SIGTERM</dt>
<dd>Some applications use a signal handling program to improve the cleanup
of the application when the job is ended. The system generates the asynchronous
signal SIGTERM for the job being ended, when the job is ending controlled
and all of the following conditions are met:<ul><li>The job is enabled for signals</li>
<li>The job is a signal handling program that is established for the SIGTERM
signal</li>
<li>The job is currently running in the problem phase</li>
</ul>
If any of the above conditions are not met, the SIGTERM signal is not
generated for the job being ended. <p>When a job being ended in a controlled
manner has a signal handling procedure for the asynchronous signal SIGTERM,
the SIGTERM signal is generated for that job. When the signal handling procedure
for the SIGTERM signal is given control, the procedure can take the appropriate
actions to allow the application to be ended in a controlled manner.</p>
</dd>
</dl>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakshowendjob.htm" title="You can use the iSeries Navigator or the character-based interface to end a job. The job can be active or on a job queue. You can end a job immediately or by specifying a time interval so that end of job processing can occur.">End a job</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="rzakshowsbsstop.htm" title="You can use iSeries Navigator or the character-based interface to stop one or more active subsystems and specify what happens to active work being processed. No new jobs or routing steps are started in the subsystem after the subsystem is stopped.">Stop a subsystem</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../rzakz/rzakzqendjoblmt.htm">Jobs system values: Maximum time for immediate end</a></div>
</div>
</div>
</body>
</html>