|
John Candidi wrote:
Thank You all! -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of phil Kestenbaum Sent: Thursday, October 06, 2005 10:33 AM To: Midrange Systems Technical Discussion Subject: RE: UPS monitoring program We run ours in QCTL, you should also make sure it is in QSTRUPPGM. -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Steve McKay Sent: Thursday, October 06, 2005 11:26 AM To: midrange-l@xxxxxxxxxxxx Subject: Re: UPS monitoring programYes, it is a CL program . . . you can compile it to whereever you'd like it to reside (hopefully not QSYS). Then you would submit the job and it would look at the messages that appear in the message queue referenced by system value QUPSMSGQ (the example uses message queue UPSMSGQ in library UTILITY) and take the appropriate action.HTH, Steve"John Candidi" <jacandidi@xxxxxxxxxxxxxxxxxxxx> wrote in message news:00ae01c5ca85$80d9b6a0$560a0a0a@xxxxxxxxxxxxxxxxxxxxxxxIs this a CL program? I would like to use this but I'm not all that familiarwith the programming end. Do I compile as CL and does it run in the background. Where do I compile it to -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Steve McKaySent: Tuesday, October 04, 2005 8:40 AM To: midrange-l@xxxxxxxxxxxx Subject: Re: UPS monitoring program <pnelson@xxxxxxxxxx> wrote in messagenews:OFA8364F1F.57DDD235-ON86257090.0046F2A5-86257090.00470673@xxxxxxxxxxxxxAnybody got one they'd care to share with me? Thanks --Paul - VERY rudimentary example . . . PGM PARM(&MSGQ &MSGQLIB &MSGKEY) /*********************************************************************/ /* */ /* Read messages from msgq UTILITY/UPSMSGQ (updated by sysval */ /* QUPSMSGQ. Monitor for various UPS messages and send messages. */ /* */ /*********************************************************************/ DCL VAR(&MSGQ) TYPE(*CHAR) LEN(10) DCL VAR(&MSGQLIB) TYPE(*CHAR) LEN(10) DCL VAR(&MSGKEY) TYPE(*CHAR) LEN(4) DCL VAR(&MSGF) TYPE(*CHAR) LEN(10) DCL VAR(&MSGFLIB) TYPE(*CHAR) LEN(10) DCL VAR(&MSGID) TYPE(*CHAR) LEN(7) DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(100) DCL VAR(&MSG) TYPE(*CHAR) LEN(132) GETMSG: RCVMSG MSGQ(&MSGQLIB/&MSGQ) MSGTYPE(*FIRST) WAIT(0) + RMV(*NO) MSG(&MSG) MSGDTA(&MSGDTA) + MSGID(&MSGID) MSGF(&MSGF) MSGFLIB(&MSGFLIB) SNDRPY MSGKEY(&MSGKEY) MSGQ(&MSGQLIB/&MSGQ) + RPY('G') RMV(*YES) /* */ /* CPF1816 indicates that we are on battery power *//* CPF1817 indicates that we are no longer on battery power */ /* CPI0961 indicates that the UPS has been disconnected *//* CPI0962 indicates that the UPS has been connected to the system */ /* CPI0963 indicates that the system is on auxiliary power */ /* CPI0964 indicates that the UPS has a weak battery */ /* CPI0973 indicates that the UPS no longer has a weak battery */ /* CPI0974 indicates that the UPS has been bypassed */ /* CPI0975 indicates that the UPS is no longer bypassed */ /* CPI097A indicates the date and time that system power restored */ /* CPI0994 indicates system power restored */ /* CPF181A indicates the date and time that system power failed */ /* CPP3500 indicates UPS reported a utility failure *//* CPP3501 indicates UPS reported power restored *//* */ IF COND(&MSGID *EQ 'CPF1816' *OR + &MSGID *EQ 'CPF1817' *OR + &MSGID *EQ 'CPI0961' *OR + &MSGID *EQ 'CPI0962' *OR + &MSGID *EQ 'CPI0963' *OR + &MSGID *EQ 'CPI0964' *OR + &MSGID *EQ 'CPI0973' *OR + &MSGID *EQ 'CPI0974' *OR + &MSGID *EQ 'CPI0975' *OR + &MSGID *EQ 'CPI097A' *OR + &MSGID *EQ 'CPI0994' *OR + &MSGID *EQ 'CPF181A' *OR + &MSGID *EQ 'CPP3500' *OR + &MSGID *EQ 'CPP3501') + THEN(DO) SNDUSRMSG MSG('HR400AL1 ' *cat &MSG *tcat ' ') + MSGTYPE(*INFO) TOUSR(STEVE) ENDDO /* */ EOJ: ENDPGM --This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxTo subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. --This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxTo subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx 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.