AS400 and UPS communication


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?

Who is Participating?
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.
KANEWONGAuthor Commented:
I am still using old AS400 which is AS400E type 9406-170.  If those commands you mentioned above are compatible with my old unit?
KANEWONGAuthor Commented:
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

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!!!!!
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.

KANEWONGAuthor Commented:
thanks for your help!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.