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

XMUT5R1.m

Go to the documentation of this file.
  1. XMUT5R1 ;(WASH ISC)/CAP-Mail Statistics Report ;05/28/2002 07:19
  1. ;;8.0;MailMan;;Jun 28, 2002
  1. ; Entry points used by MailMan options (not covered by DBIA):
  1. ; STATS XMMGR-NEWMESS/LOGON-STATS
  1. ; 0 XMMGR-BKFILER-LONGTERM-STATS (not part of 8.0)
  1. STATS ;
  1. 0 ;
  1. N XMEND,XMSTART,XMABORT
  1. S XMABORT=0
  1. D INIT(.XMSTART,.XMEND,.XMABORT) Q:XMABORT
  1. D REPORT(XMSTART,XMEND)
  1. Q
  1. INIT(XMSTART,XMEND,XMABORT) ;
  1. N DIR,X,Y,DIRUT
  1. S XMEND=$$FMADD^XLFDT($E(DT,1,5)_"01",-1) ; last day of last month
  1. S XMSTART=$E(XMEND,1,5)_"01" ; first day of last month
  1. Q:$D(ZTQUEUED)
  1. S DIR("A")="START Date"
  1. S DIR("B")=$$FMTE^XLFDT(XMSTART,"2D") ; MM/DD/YY
  1. S DIR(0)="D^:"_$$FMADD^XLFDT(DT,-1)_":EX"
  1. D ^DIR I $D(DIRUT) S XMABORT=1 Q
  1. S XMSTART=Y
  1. K X,Y,DIR,DIRUT
  1. S XMEND=$$FMADD^XLFDT(XMSTART,-1)
  1. S XMEND=$$SCH^XLFDT("1M",XMEND) ; 1 month from XMSTART
  1. S DIR("A")="END Date"
  1. S DIR("B")=$$FMTE^XLFDT($$MIN^XLFMTH(XMEND,DT),"2D") ; MM/DD/YY
  1. S DIR(0)="D^"_$$FMADD^XLFDT(XMSTART,+1)_":DT:EX"
  1. D ^DIR I $D(DIRUT) S XMABORT=1 Q
  1. S XMEND=Y
  1. Q
  1. REPORT(XMA,XMB) ;
  1. ZTSK ;Entry for Tasked report
  1. ;XMA=Start Date FM format
  1. ;XMAH=Start Date $H format
  1. ;XMB=End Date FM format
  1. ;XMBH=End Date $H format
  1. N XMC,XMD,XMV,BY,DIC,FLDS,FR,TO,L,X
  1. S X=XMB
  1. I '$D(ZTQUEUED) W !!,"Calling FileMan template ..."
  1. S XMD=$$FMTE^XLFDT(DT,"1D") ; mmm dd, yyyy
  1. S XMC=$P(^XMB("NETNAME"),".")_" MailMan Activity Report"
  1. S XMV=^%ZOSF("PROD")
  1. S BY="[XMMGR-BKFILER-DAY@23:30]",FLDS="[XMMGR-BKFILER-LONGTERM-STATS]",FR=XMA,TO=XMB_".2359",DIC="^XMBX(4.2998,",L="Report on Statistics"
  1. S:$D(ZTQUEUED) IOP=ZTIO
  1. D EN1^DIP
  1. K DIS,XMA,XMB,XMAH,XMBH,X,Y,Z,%ZIS,ZTRTN,ZTSAVE,ZTDTH
  1. I '$D(ZTQUEUED) K ZTSK
  1. Q