Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: XMCQ

XMCQ.m

Go to the documentation of this file.
  1. XMCQ ;ISC-SF/GMB-Transmit Queue Status Report ;12/04/2002 13:43
  1. ;;8.0;MailMan;**10**;Jun 28, 2002
  1. ; Was (WASH ISC)/THM
  1. ;
  1. ; Entry points used by MailMan options (not covered by DBIA):
  1. ; STATUS XMQDISP (was ENTER^XMS5A)
  1. ; SHOWQ XMQSHOW (was QUEUE^XMC4)
  1. STATUS ;
  1. D RESEQ^XMCQA
  1. D EN^XUTMDEVQ("QZTLOOP^XMCQ",$$EZBLD^DIALOG(42135)) ; MailMan: Transmission Queue Status Report
  1. Q
  1. QZTLOOP ;
  1. I $E($G(IOST),1,2)'="C-" D Q
  1. . D QZTSK
  1. . I $D(ZTQUEUED) S ZTREQ="@"
  1. F D Q:'(Y!$D(DTOUT))
  1. . D QZTSK
  1. . W !
  1. . N DIR,X,DTIME
  1. . S DTIME=5
  1. . S DIR(0)="Y",DIR("A")=$$EZBLD^DIALOG(42116) ; Refresh
  1. . S DIR("B")=$$EZBLD^DIALOG(39054) ; YES
  1. . ;Answer YES if you want the display refreshed.
  1. . ;Answer NO if you don't.
  1. . ;If you don't answer, the display will be refreshed every five seconds
  1. . D BLD^DIALOG(42117,"","","DIR(""?"")")
  1. . D ^DIR
  1. Q
  1. QZTSK ;
  1. N XMRPT,XMNAME,XMIEN,XMREC,XMQD,XMCNT,XMABORT,XMTSK,XMDT,XMTM
  1. ;Transmission Queue Status
  1. ;Domain Queued Device/Protocol Message S/R Time Line Err Rate
  1. D INIT^XMCQA(.XMRPT,42136,42137)
  1. S (XMABORT,XMCNT)=0
  1. S XMNAME=""
  1. F S XMNAME=$O(^DIC(4.2,"B",XMNAME)) Q:XMNAME="" D Q:XMABORT
  1. . S XMIEN=0
  1. . F S XMIEN=$O(^DIC(4.2,"B",XMNAME,XMIEN)) Q:'XMIEN D Q:XMABORT
  1. . . S XMREC=$G(^XMBS(4.2999,XMIEN,3))
  1. . . S XMTSK=$$TSKEXIST^XMKPR(XMIEN,$P(XMREC,U,7))
  1. . . I +XMREC,$$HDIFF^XLFDT($H,$P(XMREC,U,1),2)>180 S XMREC=""
  1. . . S XMQD=$$BMSGCT^XMXUTIL(.5,XMIEN+1000)
  1. . . I 'XMQD,'XMTSK,'XMREC Q
  1. . . I $Y+3>IOSL D Q:XMABORT
  1. . . . D PAGE^XMCQA(.XMABORT) Q:XMABORT
  1. . . . D HDR^XMCQA(.XMRPT)
  1. . . S XMCNT=XMCNT+1
  1. . . W !,$$MELD^XMXUTIL1(XMNAME,XMQD,21) ; domain, queued
  1. . . I +XMREC D Q
  1. . . . S XMDT=$P($$HTE^XLFDT($P(XMREC,U,1),"2Z"),":",1,2)
  1. . . . S XMTM=$P(XMDT,"@",2)
  1. . . . ; device, msg #, R/S, time, line, errors, rate
  1. . . . W " ",$$MELD^XMXUTIL1($P(XMREC,U,6),$P(XMREC,U,2),29)," ",$J($P(XMREC,U,8),1)," ",XMTM,$J($P(XMREC,U,3),7),$J($P(XMREC,U,4),3),$J($P(XMREC,U,5),9)
  1. . . I 'XMTSK D Q
  1. . . . W ?26,$$EZBLD^DIALOG(42138,$P($G(^DIC(4.2,XMIEN,0)),U,2)) ; No task scheduled, FLAGS=|1|
  1. . . I XMTSK[U D Q
  1. . . . N XMPARM ; Task |1| scheduled for |2|
  1. . . . S XMPARM(1)=$P(XMTSK,U),XMPARM(2)=$P($$HTE^XLFDT($P(XMTSK,U,2),"2Z"),":",1,2)
  1. . . . W ?26,$$EZBLD^DIALOG(42139,.XMPARM)
  1. . . W ?26,$$EZBLD^DIALOG(42140,XMTSK) ; Task |1| just started
  1. I 'XMCNT W !,$$EZBLD^DIALOG(42141) ; No messages queued or in active transmission.
  1. Q
  1. SHOWQ ; Display messages in queue
  1. N XMDUZ,XMINST,XMSITE,XMABORT
  1. D CHECK^XMVVITAE
  1. S XMABORT=0 ; Choose queue w/msgs
  1. D ASKINST^XMCXU(.XMINST,.XMSITE,.XMABORT,"M") Q:XMABORT
  1. I DUZ=.5 D LIST^XMJMLR(.5,XMINST+1000,XMSITE,1,.XMABORT) Q
  1. I $D(^XUSEC("XMNOPRIV",DUZ))!'$D(^XMB(3.7,"AB",DUZ,.5)) D Q
  1. . ; not a postmaster surrogate, so look only - no touch!
  1. . D LIST^XMJML(.5,XMINST+1000,XMSITE,"",1)
  1. S XMDUZ=.5
  1. D OTHER^XMVVITAE
  1. D LIST^XMJMLR(XMDUZ,XMINST+1000,XMSITE,1,.XMABORT)
  1. D SELF^XMVVITAE
  1. Q