AS400 and UPS communication

Posted on 2006-11-14
Last Modified: 2013-11-17

I am planning to purchase a Powerware 5125 UPS with a Relay Card which is used to communicate with AS400 for unattended shutdown.  I was told, I just program the AS400 before I plug my AS400 with UPS, then the UPS can shut down the server if needed.

However; I am new to AS400, anyone can tell me how to program AS400 to communicate with the UPS for unattended shutdown in case of power outage?

Question by:KANEWONG
  • 3
  • 3

Accepted Solution

javagair earned 250 total points
ID: 17942824
The ups sends a warning to the as400 the second it goes to battery.  If you have one of the new eseries as400 there is a line of code missing on the as400 so that the as400 does not record the warning, I know we have tried it, the as 400 does not know to shut down.

if you have one of older ones:

when you get the ups unit:
the powerware works well, make sure you get the correct card and cable to connect to the as400, if you have external batteries on the ups then get a copy of the setup software from powerware so the ups knows the batteries are there.  The newer ups may do this auto so ask powerware.
once you have done this and are sure how many seconds it should hold up the as400

then test the ups on the as400, do your self a favor and do it when no one is on the system.
plug in the as400 and start it up.

1.  Before pulling the power plug, go to the console.  
2.  Sign on, do a WRKSYSVAL QUPSDLYTIM  and record the value here  ____________.  If you're conducting a test to see how long the iSeries will remain up with UPS power, you need to make sure that the QUPSDLYTIM value exceeds the number of seconds of battery life.  However, DON"T set it to *CALC or *NOMAX.  If you set the value to *CALC or *NOMAX, your system will most likely go down immediately,use 9999.

3.  Do a WRKACTJOB  make sure no jobs are active.  When you have confirmed that no important jobs are active, continue to the next step.
4.  Do a ENDSBS  *ALL  *IMMED.  By ending all jobs, you'll minimize the possibility of problems if the UPS batteries are dead and the system drops like a rock.
5.  Do a WRKSBS and press F5 to refresh the display.  When only one subsystem remains, you're in a restricted state and may continue with the next step.
6.  Pull the UPS power plug from the wall power outlet.  You should immediately get a CPF1816 message in message queue QSYSOPR.  If you don't get a message in QSYSOPR regarding the loss of utility power, the iSeries will remain up until the batteries in the UPS are drained, and the iSeries will go down hard.  I recommend that you document the status indicators on the UPS panel as in the following example:

00:00 I pull the power, we get We get CPF1816, System utility power lost at 06012091109.
06:15 drop 1 light
14:26 drop 2nd light, >25% remains
20:30 4th light blinking  (Manual says 3 minute warning)
20:40  light is still blinking.  I plug in UPS power.  We get CPF1817, System utility power restored at  06012093152.

7.  The test is complete whenever you plug back in the power or the As/400 shuts down.  If you plug back in the power, you need to complete 2 tasks before you're done:
if you recorded the max time the ups will run on battery before getting itself into emergency status, then that is how long it will hold up the as 400.
**  WRKSYSVAL QUPSDLYTIM  and take option "2".  Type the value of the time the batteries were in a useable state and then minus 8 minutes (about) how long it takes for the as400 to go down and press Enter.
**  WRKSBS and press Enter.  Then type STRSBS xxxxx  where "xxxxx" is the name of the subsystem shown on the WRKSBS screen.  This will be the equivalent of an IPL.   I repeat this will shut down your system, when it comes back all subsystems will be running.
Now in a power outage you will do a safe shut down.

Author Comment

ID: 17944509
I am still using old AS400 which is AS400E type 9406-170.  If those commands you mentioned above are compatible with my old unit?

Author Comment

ID: 17949217
Hi Javagair;

You said, I need to get a copy of the stup software from powerware if I have external batteries, whether you are talking about the LanSafe on Powerware Software Suite?
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


Expert Comment

ID: 17960906
If I remember right neither work for making the ups recognize the external batteries.  Even if they tell you they will, I had to get a program from the head programmer at Powerware to do this, been trying to remember what it was called. will look.  

as400 are pretty much the same I have a 820 and a newer 520, commands are commands in os400 world. typing in the one above at the command line except the one that will bring the computer down you can look at what I mean.

I will find the names at powerware that I talked to and post them to, two really helpful men!!!!!

Expert Comment

ID: 17961106
make sure whoever you buy the powerware from that you get the right cable and as400 card, some suppliers do not actually send one that will talk to the as400 correctly. is the guy at powerware you want to email

ERM Configurator is the program you need.  for some strange reason it does not come on the cd, at least the one I had.  the problem here was that the powerware was hooked up for several years by someone that didn't bother to read the manual and check if it actually worked so when I found that it wasn't I had to get ahold of powerware and hook it up correctly.  Was easy to do and resolve with powerware.  works great after following procedure.


Author Comment

ID: 17966085
thanks for your help!

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (, discussed installing the Solaris Operating S…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question