source: WorldVistAEHR/trunk/r/MAILMAN-XM/XMUT41.m@ 703

Last change on this file since 703 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.9 KB
Line 
1XMUT41 ;(ISC-SF/GMB- XMUT4 (Cont.) ;04/17/2002 11:52
2 ;;8.0;MailMan;;Jun 28, 2002
3WARNING(XMABORT) ;
4 N DIR,X,Y,XMTEXT
5 W !
6 D BLD^DIALOG(36084,"","","XMTEXT","F")
7 D MSG^DIALOG("WM","","","","XMTEXT")
8 W !
9 ;The MailMan file checker may take some time to process.
10 ;If you have not tried it before, PLEASE try it when the
11 ;system will be quiescent for a LONG period of time.
12 ;Errors listed are generally not fatal. Most errors are
13 ;corrected. Please enter a NOIS if there are many errors.
14 ;Keep the error printout for future reference. If you see
15 ;errors in MailMan, the printout may help to resolve them.
16 S DIR(0)="Y",DIR("A")=$$EZBLD^DIALOG(36085) ; Do you wish to proceed
17 S DIR("B")=$$EZBLD^DIALOG(39053) ; "NO"
18 D ^DIR
19 I $D(DIRUT)!'Y S XMABORT=1
20 Q
21MXREF(XMABORT) ;
22 ; XMECNT # msgs in mailbox
23 N XMZ,XMUSER,XMECNT,XMK
24 W:'$D(ZTQUEUED) !!,$$EZBLD^DIALOG(36086),! ; Checking M xref
25 S (XMZ,XMECNT)=0
26 F S XMZ=$O(^XMB(3.7,"M",XMZ)) Q:'XMZ D Q:XMABORT
27 . S XMECNT=XMECNT+1 I XMECNT#5000=0 D Q:XMABORT
28 . . I '$D(ZTQUEUED) W:$X>40 ! W XMECNT,"." Q
29 . . I $$S^%ZTLOAD S (XMABORT,ZTSTOP)=1 ; User asked the task to stop
30 . S XMUSER=""
31 . F S XMUSER=$O(^XMB(3.7,"M",XMZ,XMUSER)) Q:'XMUSER D
32 . . S XMK=""
33 . . F S XMK=$O(^XMB(3.7,"M",XMZ,XMUSER,XMK)) Q:'XMK D
34 . . . Q:$D(^XMB(3.7,XMUSER,2,XMK,1,XMZ,0))
35 . . . K ^XMB(3.7,"M",XMZ,XMUSER,XMK)
36 . . . D ERR^XMUT4(121,XMUSER,XMK,XMZ) ; M xref, but msg not in bskt: xref killed
37 Q:XMABORT!$D(ZTQUEUED)
38 W !
39 D BLD^DIALOG(36092,XMECNT,"","XMTEXT","F")
40 D MSG^DIALOG("WM","",IOM,"","XMTEXT")
41 ;|1| unique messages referenced in MAILBOX file 3.7
42 Q
43POSTBSKT ; Check the Postmaster's bskts to see if any remote bskts
44 ; are numbered below 1000. If so, move them.
45 N XMK,XMKN,XMKINST,XMZ,XMINST,XMPUT
46 S XMK=1
47 F S XMK=$O(^XMB(3.7,.5,2,XMK)) Q:XMK>999!'XMK S XMKN=$P(^(XMK,0),U,1) D
48 . S XMINST=$$FIND1^DIC(4.2,"","XQ",XMKN)
49 . Q:'XMINST
50 . D ERR^XMUT4(160,.5,XMK) ; Xmit basket<1000 has domain name: investigate msgs.
51 . ; This bskt has a remote site name. Does it have msgs to xmit?
52 . S XMKINST=XMINST+1000
53 . I '$D(^XMB(3.7,.5,2,XMKINST)) D MAKEBSKT^XMXBSKT(.5,XMKINST,XMKN)
54 . S (XMZ,XMPUT)=0
55 . F S XMZ=$O(^XMB(3.7,.5,2,XMK,1,XMZ)) Q:'XMZ D
56 . . I '$D(^XMB(3.9,XMZ,1,"AQUEUE",XMINST)) D Q
57 . . . ; This msg does not need to be transmitted. Does it belong here?
58 . . . Q:$D(^XMB(3.9,XMZ,1,"C",.5))!$$BCAST^XMXSEC(XMZ)
59 . . . D ERR^XMUT4(161,.5,XMK,XMZ) ; Msg in xmit basket<1000 not addressed to Postmaster: deleted.
60 . . . D ZAPIT^XMXMSGS2(.5,XMK,XMZ)
61 . . ; This msg needs to be transmitted. Is it in the real xmit bskt?
62 . . Q:$D(^XMB(3.7,.5,2,XMKINST,1,XMZ)) ; already there
63 . . S XMPUT=XMPUT+1
64 . . I $D(^XMB(3.9,XMZ,1,"C",.5))!$$BCAST^XMXSEC(XMZ) D Q
65 . . . D ERR^XMUT4(162,.5,XMK,XMZ) ; Msg in xmit basket<1000: copied to proper bskt.
66 . . . D PUTMSG^XMXMSGS2(.5,XMKINST,XMKN,XMZ)
67 . . D ERR^XMUT4(163,.5,XMK,XMZ) ; Msg in xmit basket<1000: moved to proper bskt.
68 . . D COPYIT^XMXMSGS2(.5,XMK,XMZ,XMKINST)
69 . . D ZAPIT^XMXMSGS2(.5,XMK,XMZ)
70 . Q:$$BMSGCT^XMXUTIL(.5,XMK)
71 . N XMFDA
72 . S XMFDA(3.701,XMK_",.5,",.01)="@"
73 . D FILE^DIE("","XMFDA")
74 . D ERR^XMUT4(164,.5,XMK) ; Xmit basket<1000 with no msgs: deleted.
75 Q
76SUMMARY(XMABORT) ;
77 I $G(ZTSTOP) W !!,$$EZBLD^DIALOG(36422) ; *** Stopping prematurely per user request ***
78 W !!,$$EZBLD^DIALOG(36087) ; Summary of Integrity Check:
79 D SUM(36089,36000.1,99,199) ; Results for MAILBOX file 3.7:
80 D SUM(36091,36300.1,199,299) ; Results for MESSAGE file 3.9:
81 K XMERROR
82 Q
83SUM(XMTITLE,XMBASE,XMSTART,XMLIMIT) ;
84 N XMERRNUM,XMPARM,XMTEXT
85 W !!,$$EZBLD^DIALOG(XMTITLE) ; Results for xxx file xxx:
86 S XMERRNUM=XMSTART
87 F S XMERRNUM=$O(XMERROR(XMERRNUM)) Q:'XMERRNUM!(XMERRNUM>XMLIMIT) D
88 . S XMPARM(1)=$J(XMERRNUM,3),XMPARM(2)=XMERROR(XMERRNUM)
89 . W !!,$$EZBLD^DIALOG(36090,.XMPARM) ; Type |1| errors=|2|
90 . D BLD^DIALOG(XMBASE+XMERRNUM,"","","XMTEXT","F")
91 . D MSG^DIALOG("WE","",IOM,"","XMTEXT")
92 I '$D(XMPARM) W !,$$EZBLD^DIALOG(36088) ; No errors to report.
93 Q
Note: See TracBrowser for help on using the repository browser.