|
Thanks for the Idea, it worked great! >>> srichter@AutoCoder.com 08/03/01 09:45AM >>> Chris, send a "system being powered down" msg to qsysopr when the system is powered down. Then when the system is back up, send a "system is back up" msg to qsysopr. ( each msg a diff msgid, defined in your own msgf ) Your qsysopr message pgm will then rcv the "powered down" msg and set a flag to disable the emailing. Once the "powered up" msg is received, enable emailing. hth, Steve Richter -----Original Message----- From: Chris Beck <CBeck@good-sam.com> To: MIDRANGE-L@midrange.com <MIDRANGE-L@midrange.com> Date: Friday, August 03, 2001 10:31 AM Subject: Qsysopr message program. >I have a CL program that monitors Qsysopr for certain messages, then emails the appropriate person that the message should go to . > >The problem I have is that on one machine we take it down to a restricted state for its nightly backups. Then when the machine starts back up, it starts the message program. Then it reads all messages in qsysopr that it has not read before, and sends out the emails from machine startup. I don't want to recieve all the past messages, I would like the program to start, but not read any of the past messages and only new ones that come in. I don't wan't to monitor for all the startup messages, because then when they are sent another time I won't recieve them. > >Any suggestions? > > >Here is a sample of how the program works. > >LOOP: RCVMSG MSGQ(QSYS/QSYSOPR) WAIT(*MAX) RMV(*NO) + > MSG(&MSG) MSGDTA(&MSGDTA) MSGID(&MSGID) + > MSGF(&MSGF) MSGFLIB(&MSGFLIB) > > /* MESSAGES TO IGNORE */ > IF COND(&MSGID = 'CP13710') THEN(GOTO + > CMDLBL(LOOP)) > IF COND(&MSGID = 'CPC1236') THEN(GOTO + > CMDLBL(LOOP)) > > /* FORMAT THE SUBJECT */ > IF COND(&MSGID = ' ') THEN(CHGVAR + > VAR(&EMSGID) VALUE('GSSASDEV-MESSAGE')) >ELSE CMD(CHGVAR VAR(&EMSGID) + > VALUE('GSSASDEV-MSG ID:' *BCAT &MSGID)) > > /* EMAIL THE MESSAGE */ >SNDDST TYPE(*LMSG) TOINTNET(('xyz@GOOD-SAM.COM') > ('abc@GOOD-SAM.COM' *CC)) DSTD(&EMSGID) > LONGMSG(&MSG) > >GOTO LOOP > > > >Thanks >Chris Beck > > >+--- >| This is the Midrange System Mailing List! >| To submit a new message, send your mail to MIDRANGE-L@midrange.com. >| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. >| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. >| Questions should be directed to the list owner/operator: david@midrange.com >+--- > +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.