- XMUT5R2 ;(WASH ISC)/CAP-Daily Reports on mail deliveries ;04/17/2002 12:07
- ;;8.0;MailMan;;Jun 28, 2002
- ; Entry points used by MailMan options (not covered by DBIA):
- ; ACT XMMGR-BKFILER-ACT
- ; ASK XMMGR-BKFILER-EDIT-NORMALIZED
- ; GROUP XMMGR-BKFILER-GROUP
- ; STAT XMMGR-BKFILER-STAT
- ; TAB XMMGR-BKFILER-TABBED-STATS
- ; WAIT XMMGR-BKFILER-WAIT
- 0 ;
- N Y
- S XMA=$$FMADD^XLFDT(DT,-1)
- I '$D(ZTQUEUED) S XMA=$$DATE("RUN",$$FMTE^XLFDT(XMA,"2Z")) Q:XMA=""
- S XMB=XMA_".2359"
- S Y=DT D DD^%DT S XMD=Y
- Q
- GO ;Call FileMan to produce report
- S XMC=$P(^XMB("NETNAME"),".")_" "_L
- I '$D(ZTQUEUED) W !!,"Calling FileMan template ..."
- ;
- ;XMA=Start Date FM format
- ;XMAH=Start Date $H format
- ;XMB=End Date FM format
- ;XMBH=End Date $H format
- S XMV=^%ZOSF("PROD")
- S:'$D(BY) BY=.01 S FR=XMA,TO=XMB,DIC="^XMBX(4.2998,"
- S:$D(ZTQUEUED) IOP=ZTIO D EN1^DIP
- Q ;
- K BY,DIC,DIS,FLDS,FROM,TO,XMA,XMB,XMAH,XMBH,X,Y,Z,%ZIS,ZTRTN,ZTSAVE,ZTDTH
- I '$D(ZTQUEUED) K ZTSK
- Q
- DATE(X,Z) ;Calculate Date - Ask Start and End Dates
- N DUOUT,DTOUT,XMA,DIR,Y S DIR(0)="D^::XEP",DIR("A")=X_" Date",DIR("B")=Z
- D D ^DIR K DIRUT I $D(DUOUT)!$D(DTOUT) Q ""
- S XMA=Y I XMA'?7N.E D ^%DT X XMA=Y
- D NOW^%DTC I %-XMA<0 W !,$C(7)," No Future Dates !!!" G D
- Q XMA
- ACT ;Active Users verses Deliveries Report
- D 0 Q:XMA="" K BY
- S FLDS="[XMMGR-BKFILER-ACTIVE_USERS/DEL]",L="Active Users/Deliveries Report"
- G GO
- GROUP ;Deliveries by group
- D 0 Q:XMA="" K BY
- S FLDS="[XMMGR-BKFILER-DEL_BY_GROUP]",L="Deliveries by Group Report"
- G GO
- QUEUE ;Queue Length
- D 0 Q:XMA="" K BY
- S FLDS="[XMMGR-BKFILER-LENGTH_OF_QUEUES]",L="Length of Delivery Queues Report"
- G GO
- WAIT ;Queue Wait
- D 0 Q:XMA="" K BY
- S FLDS="[XMMGR-BKFILER-QUEUE-WAIT]",L="Active Users/Deliveries Report"
- G GO
- STAT ;Statistics / Active Users, Deliveries, Queue Wait, Response Time
- D 0 Q:XMA="" K BY
- S FLDS="[XMMGR-BKFILER-STATS-PLUS]",L="Statistics Report"
- G GO
- TAB ;Statistics for download to graphics package
- D 0 Q:XMA="" S BY="@.01"
- S FLDS="[XMMGR-BKFILER-STATS/TABBED]",L=""
- G GO
- ASK ;Ask parameters
- N DIRUT F X=1:1:5 S A=$$ASS(X) Q:$D(DIRUT) S $P(^XMB(1,1,7),",",X)=A
- Q
- ASS(I) N DIR,X,Y,Z
- S X=$P("Active Users,Lines Displayed,Message & Response Deliveries,Queue Lengths,Response Time",",",I)
- S DIR(0)="N^.1:9999999999",DIR("A")="Enter normalized "_X,DIR("B")=$P($G(^XMB(1,1,7)),",",I)
- D ^DIR
- Q X
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXMUT5R2 2429 printed Jan 18, 2025@03:14:44 Page 2
- XMUT5R2 ;(WASH ISC)/CAP-Daily Reports on mail deliveries ;04/17/2002 12:07
- +1 ;;8.0;MailMan;;Jun 28, 2002
- +2 ; Entry points used by MailMan options (not covered by DBIA):
- +3 ; ACT XMMGR-BKFILER-ACT
- +4 ; ASK XMMGR-BKFILER-EDIT-NORMALIZED
- +5 ; GROUP XMMGR-BKFILER-GROUP
- +6 ; STAT XMMGR-BKFILER-STAT
- +7 ; TAB XMMGR-BKFILER-TABBED-STATS
- +8 ; WAIT XMMGR-BKFILER-WAIT
- 0 ;
- +1 NEW Y
- +2 SET XMA=$$FMADD^XLFDT(DT,-1)
- +3 IF '$DATA(ZTQUEUED)
- SET XMA=$$DATE("RUN",$$FMTE^XLFDT(XMA,"2Z"))
- if XMA=""
- QUIT
- +4 SET XMB=XMA_".2359"
- +5 SET Y=DT
- DO DD^%DT
- SET XMD=Y
- +6 QUIT
- GO ;Call FileMan to produce report
- +1 SET XMC=$PIECE(^XMB("NETNAME"),".")_" "_L
- +2 IF '$DATA(ZTQUEUED)
- WRITE !!,"Calling FileMan template ..."
- +3 ;
- +4 ;XMA=Start Date FM format
- +5 ;XMAH=Start Date $H format
- +6 ;XMB=End Date FM format
- +7 ;XMBH=End Date $H format
- +8 SET XMV=^%ZOSF("PROD")
- +9 if '$DATA(BY)
- SET BY=.01
- SET FR=XMA
- SET TO=XMB
- SET DIC="^XMBX(4.2998,"
- +10 if $DATA(ZTQUEUED)
- SET IOP=ZTIO
- DO EN1^DIP
- Q ;
- +1 KILL BY,DIC,DIS,FLDS,FROM,TO,XMA,XMB,XMAH,XMBH,X,Y,Z,%ZIS,ZTRTN,ZTSAVE,ZTDTH
- +2 IF '$DATA(ZTQUEUED)
- KILL ZTSK
- +3 QUIT
- DATE(X,Z) ;Calculate Date - Ask Start and End Dates
- +1 NEW DUOUT,DTOUT,XMA,DIR,Y
- SET DIR(0)="D^::XEP"
- SET DIR("A")=X_" Date"
- SET DIR("B")=Z
- D DO ^DIR
- KILL DIRUT
- IF $DATA(DUOUT)!$DATA(DTOUT)
- QUIT ""
- +1 SET XMA=Y
- IF XMA'?7N.E
- DO ^%DT
- XECUTE XMA=Y
- +2 DO NOW^%DTC
- IF %-XMA<0
- WRITE !,$CHAR(7)," No Future Dates !!!"
- GOTO D
- +3 QUIT XMA
- ACT ;Active Users verses Deliveries Report
- +1 DO 0
- if XMA=""
- QUIT
- KILL BY
- +2 SET FLDS="[XMMGR-BKFILER-ACTIVE_USERS/DEL]"
- SET L="Active Users/Deliveries Report"
- +3 GOTO GO
- GROUP ;Deliveries by group
- +1 DO 0
- if XMA=""
- QUIT
- KILL BY
- +2 SET FLDS="[XMMGR-BKFILER-DEL_BY_GROUP]"
- SET L="Deliveries by Group Report"
- +3 GOTO GO
- QUEUE ;Queue Length
- +1 DO 0
- if XMA=""
- QUIT
- KILL BY
- +2 SET FLDS="[XMMGR-BKFILER-LENGTH_OF_QUEUES]"
- SET L="Length of Delivery Queues Report"
- +3 GOTO GO
- WAIT ;Queue Wait
- +1 DO 0
- if XMA=""
- QUIT
- KILL BY
- +2 SET FLDS="[XMMGR-BKFILER-QUEUE-WAIT]"
- SET L="Active Users/Deliveries Report"
- +3 GOTO GO
- STAT ;Statistics / Active Users, Deliveries, Queue Wait, Response Time
- +1 DO 0
- if XMA=""
- QUIT
- KILL BY
- +2 SET FLDS="[XMMGR-BKFILER-STATS-PLUS]"
- SET L="Statistics Report"
- +3 GOTO GO
- TAB ;Statistics for download to graphics package
- +1 DO 0
- if XMA=""
- QUIT
- SET BY="@.01"
- +2 SET FLDS="[XMMGR-BKFILER-STATS/TABBED]"
- SET L=""
- +3 GOTO GO
- ASK ;Ask parameters
- +1 NEW DIRUT
- FOR X=1:1:5
- SET A=$$ASS(X)
- if $DATA(DIRUT)
- QUIT
- SET $PIECE(^XMB(1,1,7),",",X)=A
- +2 QUIT
- ASS(I) NEW DIR,X,Y,Z
- +1 SET X=$PIECE("Active Users,Lines Displayed,Message & Response Deliveries,Queue Lengths,Response Time",",",I)
- +2 SET DIR(0)="N^.1:9999999999"
- SET DIR("A")="Enter normalized "_X
- SET DIR("B")=$PIECE($GET(^XMB(1,1,7)),",",I)
- +3 DO ^DIR
- +4 QUIT X