ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahb_5.4.0.1/rzahb_scenario.htm

96 lines
6.2 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="Scenario: Use the watch for event function with an exit program" />
<meta name="abstract" content="To learn how to use the watch for event function with an exit program, read this scenario." />
<meta name="description" content="To learn how to use the watch for event function with an exit program, read this scenario." />
<meta name="DC.Relation" scheme="URI" content="rzahb_eventfunction.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="rzahb_scenario" />
<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>Scenario: Use the watch for event function with an exit
program</title>
</head>
<body id="rzahb_scenario"><a name="rzahb_scenario"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Scenario: Use the watch for event function with an exit
program</h1>
<div><p>To learn how to use the watch for event function with an exit program,
read this scenario.</p>
<div class="section"><p><img src="./delta.gif" alt="Start of change" />You have a MYCLNUP program that you run whenever
you want to free up storage space on your system. You usually run this program
when message <tt>CPF0907</tt> (<tt class="msgph">Serious storage condition might exist</tt>)
is sent to the system operator message queue (QSYSOPR).<img src="./deltaend.gif" alt="End of change" /></p>
<p>You use the
watch for event function to automatically run your clean up program when the
amount of available storage in the system auxiliary storage pool has reached
the threshold value. Your user exit program also performs some special actions
when the available storage is less than 5 percent.</p>
</div>
<div class="section"><p><img src="./delta.gif" alt="Start of change" />To run MYCLNUP when message <tt>CPF0907</tt> enters
the specified message queue, follow these steps:<img src="./deltaend.gif" alt="End of change" /></p>
<div class="p"><img src="./delta.gif" alt="Start of change" /><ol><li>Start a watch session:<ol type="a"><li>At the command line, type <tt>STRWCH</tt> and press F4.</li>
<li>For the <span class="uicontrol">Session ID</span> prompt, specify a meaningful
session identifier, such as <tt>mycleanup</tt>.</li>
<li>For the <span class="uicontrol">Watch program parameter</span>, specify <tt>MYWCHPGM</tt>,
and type <tt>MYLIB</tt> for the <span class="uicontrol">Watch program Library</span> prompt.
MYWCHPGM is the exit program to be called when the watched for event occurs.
See <a href="rzahb_exitprogramexample.htm">Exit program for watch for event scenario</a>.</li>
<li>For the <span class="uicontrol">Watch for message</span>, <span class="uicontrol">Message identifier</span> prompt,
type <tt>CPF0907</tt>.</li>
<li>For the <span class="uicontrol">Watched message queue</span>, <span class="uicontrol">Message
queue</span> prompt, type <tt>*SYSOPR</tt>. This ensures that your watch
exit program is called when the <tt>CPF0907</tt> message is sent to the system
operator message queue.</li>
</ol>
</li>
<li>Verify that the watch session started:<ol type="a"><li>At the command line, type <tt>WRKWCH</tt> and press F4.</li>
<li>For the <span class="uicontrol">Watch</span> prompt, type <tt>*STRWCH</tt>.</li>
<li>Check to see that the MYCLEANUP session is listed under the STRWCH type.</li>
</ol>
<p>After the <tt>CPF0907</tt> message is sent to the system operator
message queue, the MYWCHPGM program in MYLIB library is called. This program
can call your MYCLNUP program and do any other function you need by customizing
the exit program.</p>
</li>
<li>When you do not need your watch session anymore, end it:<ol type="a"><li>At the command line, type <tt>ENDWCH</tt> and press F4.</li>
<li>For the <span class="uicontrol">Session ID</span> prompt, specify <tt>mycleanup</tt>.</li>
</ol>
</li>
<li>Verify that the watch session ended:<ol type="a"><li>At the command line, type <tt>WRKWCH</tt> and press F4.</li>
<li>For the <span class="uicontrol">Watch</span> prompt, type <tt>*STRWCH</tt>.</li>
<li>Check to see that the MYCLEANUP session is not listed anymore.<div class="note"><span class="notetitle">Note:</span> You
can also type <tt>DSPMSG MSGQ(*SYSOPR)</tt> to verify that the watch session
has ended. You should see the <tt>CPI3999</tt> message, which indicates that
the MYCLEANUP watch session was ended because of reason code 08. Reason code
08 indicates that the End Watch (ENDWCH) command or End Watch (QSCEWCH) API
was issued.</div>
</li>
</ol>
</li>
</ol>
<img src="./deltaend.gif" alt="End of change" /></div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzahb_eventfunction.htm" title="The watch for event function enhances your ability to detect and react to problems represented by specific messages or Licensed Internal Code log entries. The watch for event function notifies you when the specified event (message or Licensed Internal Code log entry) occurs, and then calls the specified exit program to take the desired action.">Watch for event function</a></div>
</div>
</div>
</body>
</html>