|
Dan, Thks for this code snippet.. The Brkmsg options talk about a 4 char KeyVar being passed. Where does this figure in your code, and how does this get translated to the 7 byte msgid for compare/lookup? Also, If i were to instigate this code on general usermsgQ's (like my own ) with an email program attached to send the details, are there any obvious gotcha's or limitations to watch for? Ian. -----Original Message----- From: James W. Kilgore [mailto:eMail@James-W-Kilgore.com] Sent: Sunday, 23 September 2001 1:13 To: midrange-l@midrange.com Subject: Re: UPS & AS/400 talking to each other Dan, You can write your own. Change system value QUPSMSGQ to point to QSYS/QSYSMSG. Set this message queue in break mode and write a break handling program and assign it to the message queue. Monitor for message CPF1816. hth Code snip: FMT ** ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 0017.00 DCL &MSGF *CHAR 10 /* Message file name */ 0018.00 DCL &MSGFLIB *CHAR 10 /* Message file library */ 0019.00 DCL &MSGID *CHAR 7 /* Message identifier */ 0020.00 DCL &MSGDTA *CHAR 100 /* Message data */ 0021.00 DCL &MSG *CHAR 132 /* Message */ 0022.00 /* ------------------------------------------------------------------*/ FMT ** ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 0047.00 /* ------------------------------------------------------------------*/ 0048.00 /* Processing loop to receive error messages */ 0049.00 /* ------------------------------------------------------------------*/ 0050.00 BGNEXC: RCVMSG MSGQ(QSYSMSG) WAIT(*MAX) MSG(&MSG) + 0051.00 MSGDTA(&MSGDTA) MSGID(&MSGID) + 0052.00 MSGF(&MSGF) MSGFLIB(&MSGFLIB) 0053.00 /* ------------------------------------------------------------------*/ 0075.00 /* ------------------------------------------------------------------*/ 0076.00 /* Power outage - Using UPS battery power */ 0077.00 IF (&MSGID *EQ 'CPF1816') DO <<<<your processing here>>>> 0083.00 GOTO BGNEXC 0084.00 ENDDO 0085.00 /* ------------------------------------------------------------------*/ "Bale, Dan" wrote: > > > O.K., next question: Is there software involved like I see in some > Windows-based PC UPS's? > _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l or email: MIDRANGE-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.