I don't know that I've implemented a solution with this particular UPS before, but I have written programs that monitor the QUPSMSGQ and perform an orderly shutdown.
Jim Sloane's excellent (though a bit pricey if you have a big system) TAATOOLS utilties include a nice UPS Monitoring utility, too:
http://taatool.com/document/L_upsmon.htmTh
ere are also free resources and sample code for writing power-handling programs on the web (Google "QUPSMSGQ" and "QUPSMSGQ example"):
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/rzahr/rzahrwrtpgmco.htm
http://www.redbooks.ibm.com/pubs/html/as400/v4r5/ic2924/index.htm?info/RZAHRXMPPGMRX.HTM
- Gary Patterson