source: WorldVistAEHR/trunk/r/MAILMAN-XM/XMUT5R2.m@ 1087

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

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1XMUT5R2 ;(WASH ISC)/CAP-Daily Reports on mail deliveries ;04/17/2002 12:07
2 ;;8.0;MailMan;;Jun 28, 2002
3 ; Entry points used by MailMan options (not covered by DBIA):
4 ; ACT XMMGR-BKFILER-ACT
5 ; ASK XMMGR-BKFILER-EDIT-NORMALIZED
6 ; GROUP XMMGR-BKFILER-GROUP
7 ; STAT XMMGR-BKFILER-STAT
8 ; TAB XMMGR-BKFILER-TABBED-STATS
9 ; WAIT XMMGR-BKFILER-WAIT
100 ;
11 N Y
12 S XMA=$$FMADD^XLFDT(DT,-1)
13 I '$D(ZTQUEUED) S XMA=$$DATE("RUN",$$FMTE^XLFDT(XMA,"2Z")) Q:XMA=""
14 S XMB=XMA_".2359"
15 S Y=DT D DD^%DT S XMD=Y
16 Q
17GO ;Call FileMan to produce report
18 S XMC=$P(^XMB("NETNAME"),".")_" "_L
19 I '$D(ZTQUEUED) W !!,"Calling FileMan template ..."
20 ;
21 ;XMA=Start Date FM format
22 ;XMAH=Start Date $H format
23 ;XMB=End Date FM format
24 ;XMBH=End Date $H format
25 S XMV=^%ZOSF("PROD")
26 S:'$D(BY) BY=.01 S FR=XMA,TO=XMB,DIC="^XMBX(4.2998,"
27 S:$D(ZTQUEUED) IOP=ZTIO D EN1^DIP
28Q ;
29 K BY,DIC,DIS,FLDS,FROM,TO,XMA,XMB,XMAH,XMBH,X,Y,Z,%ZIS,ZTRTN,ZTSAVE,ZTDTH
30 I '$D(ZTQUEUED) K ZTSK
31 Q
32DATE(X,Z) ;Calculate Date - Ask Start and End Dates
33 N DUOUT,DTOUT,XMA,DIR,Y S DIR(0)="D^::XEP",DIR("A")=X_" Date",DIR("B")=Z
34D D ^DIR K DIRUT I $D(DUOUT)!$D(DTOUT) Q ""
35 S XMA=Y I XMA'?7N.E D ^%DT X XMA=Y
36 D NOW^%DTC I %-XMA<0 W !,$C(7)," No Future Dates !!!" G D
37 Q XMA
38ACT ;Active Users verses Deliveries Report
39 D 0 Q:XMA="" K BY
40 S FLDS="[XMMGR-BKFILER-ACTIVE_USERS/DEL]",L="Active Users/Deliveries Report"
41 G GO
42GROUP ;Deliveries by group
43 D 0 Q:XMA="" K BY
44 S FLDS="[XMMGR-BKFILER-DEL_BY_GROUP]",L="Deliveries by Group Report"
45 G GO
46QUEUE ;Queue Length
47 D 0 Q:XMA="" K BY
48 S FLDS="[XMMGR-BKFILER-LENGTH_OF_QUEUES]",L="Length of Delivery Queues Report"
49 G GO
50WAIT ;Queue Wait
51 D 0 Q:XMA="" K BY
52 S FLDS="[XMMGR-BKFILER-QUEUE-WAIT]",L="Active Users/Deliveries Report"
53 G GO
54STAT ;Statistics / Active Users, Deliveries, Queue Wait, Response Time
55 D 0 Q:XMA="" K BY
56 S FLDS="[XMMGR-BKFILER-STATS-PLUS]",L="Statistics Report"
57 G GO
58TAB ;Statistics for download to graphics package
59 D 0 Q:XMA="" S BY="@.01"
60 S FLDS="[XMMGR-BKFILER-STATS/TABBED]",L=""
61 G GO
62ASK ;Ask parameters
63 N DIRUT F X=1:1:5 S A=$$ASS(X) Q:$D(DIRUT) S $P(^XMB(1,1,7),",",X)=A
64 Q
65ASS(I) N DIR,X,Y,Z
66 S X=$P("Active Users,Lines Displayed,Message & Response Deliveries,Queue Lengths,Response Time",",",I)
67 S DIR(0)="N^.1:9999999999",DIR("A")="Enter normalized "_X,DIR("B")=$P($G(^XMB(1,1,7)),",",I)
68 D ^DIR
69 Q X
Note: See TracBrowser for help on using the repository browser.