157 lines
11 KiB
HTML
157 lines
11 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="Writing a power-handling program" />
|
|
<meta name="abstract" content="A power-handling program should be activated at each IPL and remain active at all times. It should be accounted for in the activity level available in work management subsystem specifications." />
|
|
<meta name="description" content="A power-handling program should be activated at each IPL and remain active at all times. It should be accounted for in the activity level available in work management subsystem specifications." />
|
|
<meta name="DC.Relation" scheme="URI" content="rzahrphpgmco.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzahrimpgmpi.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzahrxmppgmrx.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzahrtstpgmrx.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="rzahrwrtpgmco" />
|
|
<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>Writing a power-handling program</title>
|
|
</head>
|
|
<body id="rzahrwrtpgmco"><a name="rzahrwrtpgmco"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Writing a power-handling program</h1>
|
|
<div><p>A power-handling program should be activated at each IPL and remain
|
|
active at all times. It should be accounted for in the activity level available
|
|
in work management subsystem specifications.</p>
|
|
<div class="p">The message queue that is specified in QUPSMSGQ is used for uninterruptible
|
|
power supply message processing. The program normally allocates the queue
|
|
by specifying the command: <pre>ALCOBJ OBJ(xxx/yyy *MSGQ *EXCL)</pre>
|
|
</div>
|
|
<div class="p">When a message arrives, the critical messages to process are: <ul><li><strong>CPF1816: System utility power failed at &1;</strong> (this message
|
|
applies to the battery feature and full power supply)</li>
|
|
<li><strong>CPF1817: System power restored at &1;</strong> (this message applies
|
|
to the battery feature and full power supply)</li>
|
|
<li><strong>CPI0994: System power is restored</strong> (this message applies to the
|
|
limited uninterruptible power supply)</li>
|
|
<li><strong>CPI0963: System on auxiliary power</strong> (this message applies if system
|
|
power fails during the IPL)</li>
|
|
</ul>
|
|
</div>
|
|
<p>You can choose to ignore the other messages.</p>
|
|
<p>Your program can handle a brief power interruption without doing any unique
|
|
processing. For example, when the CPF1816 message arrives, you can set a
|
|
switch in your program that indicates that the message occurred. The program
|
|
might then perform a RCVMSG with WAIT(10) to cause a time-out in 10 seconds.
|
|
If the CPF1817 message is received before the time-out occurs, you can reset
|
|
the switch and perform no other action.</p>
|
|
<div class="p">Your program can prepare for a normal shut down if power is not restored
|
|
after a brief time period. For example, if you have remote workstations that
|
|
are still active, you may want to send them a message requesting they sign
|
|
off quickly. You may want to issue ENDSBS OPTION(*CNTRLD) to prevent new workstations
|
|
from signing on or new batch work from beginning. If you have batch jobs
|
|
running, you may want to end them with the following command: <pre>ENDJOB OPTION(*CNTRLD)</pre>
|
|
</div>
|
|
<p>This sets an indicator to end the job. Some higher level languages and
|
|
the control language allow you to test within a program to see if a controlled
|
|
ENDJOB was specified. If the program does not end itself, the default on
|
|
ENDJOB (30 seconds) is used.</p>
|
|
<p>You can set a second timer in your program, such as RCVMSG WAIT(120). If
|
|
utility power has not been restored, you can issue the PWRDWNSYS OPTION(*IMMED)
|
|
command. The wait time should be specified based on your battery time and
|
|
the time that is required for a power-down.</p>
|
|
<div class="p">If you name a message queue for the QUPSMSGQ system value and *NOMAX for
|
|
QUPSDLYTIM, the following conditions apply: <ul><li>The message queue you specify must be allocated by a program when the
|
|
CPF1816 message occurs.</li>
|
|
<li>If the message queue you specify is a workstation message queue, it must
|
|
be in a break or notify mode.</li>
|
|
</ul>
|
|
If not, the system assumes that no power handling program exists, and
|
|
the system will be powered down.</div>
|
|
<div class="note"><span class="notetitle">Note:</span> When the system has been placed in a restricted state (for example,
|
|
ENDSBS *ALL), your uninterruptible power supply handling program will no longer
|
|
be active. For this reason, it is necessary to prepare an alternate method
|
|
of dealing with your uninterruptible power supply and any possible power interruptions
|
|
that may occur while your system is in a restricted state.</div>
|
|
<p>For example, when performing a SAVSYS (Save System) or RCLSTG (Reclaim
|
|
Storage), your uninterruptible power supply program will no longer be active
|
|
once all subsystems have been terminated. Only a single workstation job will
|
|
be active. You can perform one of the following actions as an alternative:</p>
|
|
<ol><li>After all subsystems have been ended, from the command line change the
|
|
mode for the message queue specified in system value QUPSMSGQ to *BREAK. This
|
|
will cause all uninterruptible power supply messages to be sent as break messages
|
|
to the user signed on to that workstation. With this method the user will
|
|
manually decide what to do should a power failure occur.</li>
|
|
<li>Change the system value QUPSDLYTIM to some value other than *NOMAX (for
|
|
example, the number of minutes you want the uninterruptible power supply to
|
|
ride out the power failure). This method will prevent the system from performing
|
|
an immediate quick shut down. However, if a power failure occurs, a quick
|
|
shut down will be performed if the power failure lasts longer than the value
|
|
specified for the system value QUPSDLYTIM.</li>
|
|
<li>Change your existing uninterruptible power supply handling program for
|
|
use as a BREAK HANDLING program which may be used while the system is in a
|
|
restricted state. This can be done by creating a second version of your uninterruptible
|
|
power supply program that does not allocate the message queue specified in
|
|
system value QUPSMSGQ. (In other words, do not use the ALCOBJ command.) To
|
|
utilize this program while in a restricted state, before starting a dedicated
|
|
function such as SAVSYS, enter the command: <pre>CHGMSGQ MSGQ(LIB/MSGQ) DLVRY(*BREAK)
|
|
PGM(LIB/PGM)</pre>
|
|
<p>where (LIB/MSGQ) is the name the message queue
|
|
specified in system value QUPSMSGQ, and (PGM/LIB) is the name of your modified
|
|
uninterruptible power supply handling program. Now, should a power failure
|
|
occur, the power failure message will be handled by the break handling program,
|
|
even while a function such as SAVSYS is running. To deactivate the break
|
|
handling program either have the user sign off or enter:</p>
|
|
<pre>CHGMSGQ MSGQ(LIB/MSGQ) DLVRY(*HOLD)
|
|
PGM(*DSPMSG)</pre>
|
|
<p>Once you have deactivated the break handling program,
|
|
you should immediately start your subsystems and your normal uninterruptible
|
|
power supply handling program.</p>
|
|
</li>
|
|
</ol>
|
|
<div class="section"><p>IBM grants you a nonexclusive copyright license to use all programming
|
|
code examples from which you can generate similar function tailored to your
|
|
own specific needs.</p>
|
|
<p><img src="./delta.gif" alt="Start of change" />SUBJECT TO ANY STATUTORY WARRANTIES WHICH
|
|
CANNOT BE EXCLUDED, IBM, ITS PROGRAM DEVELOPERS AND SUPPLIERS MAKE NO WARRANTIES
|
|
OR CONDITIONS EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE
|
|
IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
PURPOSE, AND NON-INFRINGEMENT, REGARDING THE PROGRAM OR TECHNICAL SUPPORT,
|
|
IF ANY. <img src="./deltaend.gif" alt="End of change" /></p>
|
|
<p><img src="./delta.gif" alt="Start of change" />UNDER NO CIRCUMSTANCES IS IBM, ITS PROGRAM DEVELOPERS
|
|
OR SUPPLIERS LIABLE FOR ANY OF THE FOLLOWING, EVEN IF INFORMED OF THEIR POSSIBILITY: <img src="./deltaend.gif" alt="End of change" /></p>
|
|
<img src="./delta.gif" alt="Start of change" /><ol><li>LOSS OF, OR DAMAGE TO, DATA;</li>
|
|
<li>DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES, OR FOR ANY ECONOMIC
|
|
CONSEQUENTIAL DAMAGES; OR </li>
|
|
<li>LOST PROFITS, BUSINESS, REVENUE, GOODWILL, OR ANTICIPATED SAVINGS.</li>
|
|
</ol><img src="./deltaend.gif" alt="End of change" />
|
|
<p><img src="./delta.gif" alt="Start of change" />SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION
|
|
OF DIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, SO SOME OR ALL OF THE ABOVE
|
|
LIMITATIONS OR EXCLUSIONS MAY NOT APPLY TO YOU.<img src="./deltaend.gif" alt="End of change" /></p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<ul class="ullinks">
|
|
<li class="ulchildlink"><strong><a href="rzahrxmppgmrx.htm">Example: Power-handling CL program</a></strong><br />
|
|
You can use the sample program with a full uninterruptible power supply.</li>
|
|
<li class="ulchildlink"><strong><a href="rzahrtstpgmrx.htm">Example: Testing a power-handling CL program</a></strong><br />
|
|
Once a power-handling program has been created, you can test it by creating a simple CL program that uses the Send Program Message (SNDPGMMSG) command and the Delay Job (DLYJOB) command. Set the DLY parameter value on the DLYJOB command to meet your testing needs.</li>
|
|
</ul>
|
|
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzahrphpgmco.htm" title="System software support is essentially the same for both the battery feature and the uninterruptible power supply attachment.">Enabling a power-handling program to control system activity during a power interruption</a></div>
|
|
<div class="previouslink"><strong>Previous topic:</strong> <a href="rzahrimpgmpi.htm" title="This topic highlights what you need to do to use a power-handling program for a system when a full uninterruptible power supply is attached.">Implementing a power-handling program</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |