source: FOIAVistA/trunk/r/MAILMAN-XM/XMUT2.m@ 1501

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

initial load of FOIAVistA 6/30/08 version

File size: 3.3 KB
Line 
1XMUT2 ;(WASH ISC)/CAP-Large Msg Report ;12/04/2002 13:49
2 ;;8.0;MailMan;**10**;Jun 28, 2002
3 ; Entry points used by MailMan options (not covered by DBIA):
4 ; ENTER XMMGR-LARGE-MESSAGE-REPORT
5ENTER ;
6 N XMABORT,XML,XMD,I,XMSAVE
7 S XMABORT=0
8 D INIT(.XML,.XMD,.XMABORT) Q:XMABORT
9 I $D(ZTQUEUED) D PROCESS(XML,XMD) Q
10 F I="XML","XMD" S XMSAVE(I)=""
11 D EN^XUTMDEVQ("PROC^XMUT2",$$EZBLD^DIALOG(36200),.XMSAVE) ; MailMan: Large Message Report
12 Q
13INIT(XML,XMD,XMABORT) ;
14 S XML=$G(^XMB(1,1,"XMUT2-LINES")) I 'XML S XML=100
15 S XMD=$O(^XMB(3.9,"C",""))
16 Q:$D(ZTQUEUED)
17 W !,$$EZBLD^DIALOG(36201),! ; This report lists messages longer than a certain number of lines.
18 D MINLINES(.XML,.XMABORT) Q:XMABORT
19 D STARTDT(.XMD,.XMABORT) Q:XMABORT
20 Q
21MINLINES(XML,XMABORT) ;
22 N DIR,X,Y,DA
23 ;Report on messages longer than this many lines
24 D BLD^DIALOG(36203,"","","DIR(""A"")")
25 S DIR(0)="4.3,8.14",DA=1
26 D ^DIR I $D(DIRUT) S XMABORT=1 Q
27 Q:Y=XML
28 S XML=Y
29 K DIR,X,Y,DA
30 ;Make this the default for future reports
31 D BLD^DIALOG(36204,"","","DIR(""A"")")
32 S DIR("B")=$$EZBLD^DIALOG(39054) ; Yes
33 S DIR(0)="Y"
34 D ^DIR I $D(DIRUT) S XMABORT=1 Q
35 Q:'Y
36 S $P(^XMB(1,1,"XMUT2-LINES"),U)=XML
37 Q
38STARTDT(XMD,XMABORT) ;
39 N DIR,X
40 ;The default starting date is the date of the oldest message.
41 ;Enter the start date
42 W !
43 D BLD^DIALOG(36202,"","","DIR(""A"")")
44 S DIR("B")=$$FMTE^XLFDT(XMD,5)
45 S DIR(0)="D^"_XMD_":"_DT_";EP"
46 D ^DIR I $D(DIRUT) S XMABORT=1
47 S XMD=Y
48 Q
49PROCESS(XML,XMD) ;
50PROC ;
51 N XMABORT,XMPAGE,XMCNT,XMDATE,XMREC,XMLINES,XMLEN,XMZ,XMLEFT
52 S XMLEN("XMZ")=$$MAX^XLFMTH($L($O(^XMB(3.9,"A"),-1)),$L($$EZBLD^DIALOG(34633))) ;Msg ID
53 S XMLEN("LINE")=$$MAX^XLFMTH(7,$L($$EZBLD^DIALOG(34003.1))+1) ;Lines
54 S XMLEN("RCPT")=$$MAX^XLFMTH(6,$L($$EZBLD^DIALOG(36207))+1) ;Rcpts
55 S XMLEFT=75-XMLEN("XMZ")-XMLEN("LINE")-XMLEN("RCPT")
56 S XMLEN("FROM")=XMLEFT\2
57 S XMLEN("SUBJ")=XMLEFT-XMLEN("FROM")
58 S (XMABORT,XMCNT,XMPAGE)=0
59 S XMDATE=$$FMTE^XLFDT(DT,5)
60 W:$E(IOST,1,2)="C-" @IOF
61 D HDR
62 S XMD=XMD-.1
63 S XMZ=""
64 F S XMD=$O(^XMB(3.9,"C",XMD)) Q:XMD="" D Q:XMABORT
65 . F S XMZ=$O(^XMB(3.9,"C",XMD,XMZ)) Q:XMZ="" D Q:XMABORT
66 . . S XMCNT=XMCNT+1
67 . . S XMLINES=+$P($G(^XMB(3.9,XMZ,2,0)),U,4)
68 . . I $E(IOST,1,2)="C-",XMCNT#1000=0 W:$X>50 ! W "."
69 . . Q:XMLINES'>XML
70 . . S XMREC=$G(^XMB(3.9,XMZ,0))
71 . . Q:$P(XMREC,U)?1"R"1N.N
72 . . S XMRECIPS=+$P($G(^XMB(3.9,XMZ,1,0)),U,4)
73 . . I $Y+3>IOSL D PAGE(.XMABORT) Q:XMABORT
74 . . W !,$J(XMZ,XMLEN("XMZ")),$J(XMLINES,XMLEN("LINE")),$J(XMRECIPS,XMLEN("RCPT"))," "
75 . . W $$LJ^XLFSTR($E($$NAME^XMXUTIL($P(XMREC,U,2)),1,XMLEN("FROM")),XMLEN("FROM"))," ",$$LJ^XLFSTR($E($$SUBJ^XMXUTIL2(XMREC),1,XMLEN("SUBJ")),XMLEN("SUBJ"))
76 Q:XMABORT
77 I $E(IOST,1,2)="C-" D WAIT^XMXUTIL
78 I $D(ZTQUEUED) S ZTREQ="@"
79 Q
80PAGE(XMABORT) ;
81 I $E(IOST,1,2)="C-" D PAGE^XMXUTIL(.XMABORT) Q:XMABORT
82 W @IOF
83 D HDR
84 Q
85HDR ;
86 S XMPAGE=XMPAGE+1
87 ;Messages with more than _XML_ lines,?50,Report date: _XMDATE_ _Page
88 W $$EZBLD^DIALOG(36205,XML),?50,$$EZBLD^DIALOG(36206,XMDATE)," ",$$EZBLD^DIALOG(34542,XMPAGE)
89 ; Msg ID / Lines / Rcpts / From / Subject
90 W !!,$J($$EZBLD^DIALOG(34633),XMLEN("XMZ")),$J($$EZBLD^DIALOG(34003.1),XMLEN("LINE")),$J($$EZBLD^DIALOG(36207),XMLEN("RCPT"))," ",$$LJ^XLFSTR($$EZBLD^DIALOG(34006),XMLEN("FROM"))," ",$$EZBLD^DIALOG(34002),!
91 Q
92ENT ;
93 N XML,XMD
94 S XML=1000,XMD=0
95 F I="XML","XMD" S XMSAVE(I)=""
96 D EN^XUTMDEVQ("PROC^XMUT2",$$EZBLD^DIALOG(36200),.XMSAVE) ; MailMan: Large Message Report
97 Q
Note: See TracBrowser for help on using the repository browser.