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

XMUT41.m

Go to the documentation of this file.
  1. XMUT41 ;(ISC-SF/GMB- XMUT4 (Cont.) ;04/17/2002 11:52
  1. ;;8.0;MailMan;;Jun 28, 2002
  1. WARNING(XMABORT) ;
  1. N DIR,X,Y,XMTEXT
  1. W !
  1. D BLD^DIALOG(36084,"","","XMTEXT","F")
  1. D MSG^DIALOG("WM","","","","XMTEXT")
  1. W !
  1. ;The MailMan file checker may take some time to process.
  1. ;If you have not tried it before, PLEASE try it when the
  1. ;system will be quiescent for a LONG period of time.
  1. ;Errors listed are generally not fatal. Most errors are
  1. ;corrected. Please enter a NOIS if there are many errors.
  1. ;Keep the error printout for future reference. If you see
  1. ;errors in MailMan, the printout may help to resolve them.
  1. S DIR(0)="Y",DIR("A")=$$EZBLD^DIALOG(36085) ; Do you wish to proceed
  1. S DIR("B")=$$EZBLD^DIALOG(39053) ; "NO"
  1. D ^DIR
  1. I $D(DIRUT)!'Y S XMABORT=1
  1. Q
  1. MXREF(XMABORT) ;
  1. ; XMECNT # msgs in mailbox
  1. N XMZ,XMUSER,XMECNT,XMK
  1. W:'$D(ZTQUEUED) !!,$$EZBLD^DIALOG(36086),! ; Checking M xref
  1. S (XMZ,XMECNT)=0
  1. F S XMZ=$O(^XMB(3.7,"M",XMZ)) Q:'XMZ D Q:XMABORT
  1. . S XMECNT=XMECNT+1 I XMECNT#5000=0 D Q:XMABORT
  1. . . I '$D(ZTQUEUED) W:$X>40 ! W XMECNT,"." Q
  1. . . I $$S^%ZTLOAD S (XMABORT,ZTSTOP)=1 ; User asked the task to stop
  1. . S XMUSER=""
  1. . F S XMUSER=$O(^XMB(3.7,"M",XMZ,XMUSER)) Q:'XMUSER D
  1. . . S XMK=""
  1. . . F S XMK=$O(^XMB(3.7,"M",XMZ,XMUSER,XMK)) Q:'XMK D
  1. . . . Q:$D(^XMB(3.7,XMUSER,2,XMK,1,XMZ,0))
  1. . . . K ^XMB(3.7,"M",XMZ,XMUSER,XMK)
  1. . . . D ERR^XMUT4(121,XMUSER,XMK,XMZ) ; M xref, but msg not in bskt: xref killed
  1. Q:XMABORT!$D(ZTQUEUED)
  1. W !
  1. D BLD^DIALOG(36092,XMECNT,"","XMTEXT","F")
  1. D MSG^DIALOG("WM","",IOM,"","XMTEXT")
  1. ;|1| unique messages referenced in MAILBOX file 3.7
  1. Q
  1. POSTBSKT ; Check the Postmaster's bskts to see if any remote bskts
  1. ; are numbered below 1000. If so, move them.
  1. N XMK,XMKN,XMKINST,XMZ,XMINST,XMPUT
  1. S XMK=1
  1. F S XMK=$O(^XMB(3.7,.5,2,XMK)) Q:XMK>999!'XMK S XMKN=$P(^(XMK,0),U,1) D
  1. . S XMINST=$$FIND1^DIC(4.2,"","XQ",XMKN)
  1. . Q:'XMINST
  1. . D ERR^XMUT4(160,.5,XMK) ; Xmit basket<1000 has domain name: investigate msgs.
  1. . ; This bskt has a remote site name. Does it have msgs to xmit?
  1. . S XMKINST=XMINST+1000
  1. . I '$D(^XMB(3.7,.5,2,XMKINST)) D MAKEBSKT^XMXBSKT(.5,XMKINST,XMKN)
  1. . S (XMZ,XMPUT)=0
  1. . F S XMZ=$O(^XMB(3.7,.5,2,XMK,1,XMZ)) Q:'XMZ D
  1. . . I '$D(^XMB(3.9,XMZ,1,"AQUEUE",XMINST)) D Q
  1. . . . ; This msg does not need to be transmitted. Does it belong here?
  1. . . . Q:$D(^XMB(3.9,XMZ,1,"C",.5))!$$BCAST^XMXSEC(XMZ)
  1. . . . D ERR^XMUT4(161,.5,XMK,XMZ) ; Msg in xmit basket<1000 not addressed to Postmaster: deleted.
  1. . . . D ZAPIT^XMXMSGS2(.5,XMK,XMZ)
  1. . . ; This msg needs to be transmitted. Is it in the real xmit bskt?
  1. . . Q:$D(^XMB(3.7,.5,2,XMKINST,1,XMZ)) ; already there
  1. . . S XMPUT=XMPUT+1
  1. . . I $D(^XMB(3.9,XMZ,1,"C",.5))!$$BCAST^XMXSEC(XMZ) D Q
  1. . . . D ERR^XMUT4(162,.5,XMK,XMZ) ; Msg in xmit basket<1000: copied to proper bskt.
  1. . . . D PUTMSG^XMXMSGS2(.5,XMKINST,XMKN,XMZ)
  1. . . D ERR^XMUT4(163,.5,XMK,XMZ) ; Msg in xmit basket<1000: moved to proper bskt.
  1. . . D COPYIT^XMXMSGS2(.5,XMK,XMZ,XMKINST)
  1. . . D ZAPIT^XMXMSGS2(.5,XMK,XMZ)
  1. . Q:$$BMSGCT^XMXUTIL(.5,XMK)
  1. . N XMFDA
  1. . S XMFDA(3.701,XMK_",.5,",.01)="@"
  1. . D FILE^DIE("","XMFDA")
  1. . D ERR^XMUT4(164,.5,XMK) ; Xmit basket<1000 with no msgs: deleted.
  1. Q
  1. SUMMARY(XMABORT) ;
  1. I $G(ZTSTOP) W !!,$$EZBLD^DIALOG(36422) ; *** Stopping prematurely per user request ***
  1. W !!,$$EZBLD^DIALOG(36087) ; Summary of Integrity Check:
  1. D SUM(36089,36000.1,99,199) ; Results for MAILBOX file 3.7:
  1. D SUM(36091,36300.1,199,299) ; Results for MESSAGE file 3.9:
  1. K XMERROR
  1. Q
  1. SUM(XMTITLE,XMBASE,XMSTART,XMLIMIT) ;
  1. N XMERRNUM,XMPARM,XMTEXT
  1. W !!,$$EZBLD^DIALOG(XMTITLE) ; Results for xxx file xxx:
  1. S XMERRNUM=XMSTART
  1. F S XMERRNUM=$O(XMERROR(XMERRNUM)) Q:'XMERRNUM!(XMERRNUM>XMLIMIT) D
  1. . S XMPARM(1)=$J(XMERRNUM,3),XMPARM(2)=XMERROR(XMERRNUM)
  1. . W !!,$$EZBLD^DIALOG(36090,.XMPARM) ; Type |1| errors=|2|
  1. . D BLD^DIALOG(XMBASE+XMERRNUM,"","","XMTEXT","F")
  1. . D MSG^DIALOG("WE","",IOM,"","XMTEXT")
  1. I '$D(XMPARM) W !,$$EZBLD^DIALOG(36088) ; No errors to report.
  1. Q