XMUT5B ;(WASH ISC)/CAP-Gather Delivery Queue Data ;04/17/2002 12:05
;;8.0;MailMan;;Jun 28, 2002
;;XX.XX
;
;M("O") & R("O") = #items ^ timestamp of oldest ^ #deliveries
;M("T") & R("T") = same as "O" above except for all messages/responses
GO ;S X="USERY^XMUT5B",@^%ZOSF("TRAP"),X=$ZC(%SPAWN,"SUBMIT/QUE=FORUM7_BATCH LEEUSER.COM")
GP ;
N I,XMFWD
S XMFWD=$$EZBLD^DIALOG(36223) ; (f)
S M("T")=0
F I=1:1:10 S M("O",I)=0 I $D(^XMBPOST("M",I)) D Q("M",.M,I)
S R("T")=0
F I=1:1:10 S R("O",I)=0 I $D(^XMBPOST("R",I)) D Q("R",.R,I)
Q
Q(XMGROUP,XMQ,I) ;
N XMREC,XMTSTAMP,XMZ
S XMREC=$G(^XMBPOST(XMGROUP,I)),XMTSTAMP=$O(^(I,0)) S XMZ=$S(XMTSTAMP:$O(^(XMTSTAMP,"")),1:"")
I XMGROUP="M",XMZ D
. I XMZ[U S XMZ=$P(XMZ,U,1)_U_XMFWD ; if [U, then it's a forward
. E S XMZ=XMZ_U
. S XMZ=XMZ_U_$O(^XMB(3.7,"M",$P(XMZ,U,1),""),-1) ; latest delivery
S XMQ("O",I)=+XMREC_U_XMTSTAMP_U_$P(XMREC,U,2)_U_XMZ
Q:'XMREC
S $P(XMQ("T"),U)=$P(XMQ("T"),U)+XMREC,$P(XMQ("T"),U,3)=$P(XMQ("T"),U,3)+$P(XMREC,U,2)
I $S('$P(XMQ("T"),U,2):1,$P(XMQ("T"),U,2)>XMTSTAMP:1,1:0) S $P(XMQ("T"),U,2)=XMTSTAMP
Q
USERS(%) ;Get the number of ZSLOT users
;%=1 do not display output, %=0 display
N X,A,B,C,Y,Z,ZSLOTDSP S ZSLOTDSP=%
;
;First -- is the ZSLOT software installed ?
S X="ZSLOT" X ^%ZOSF("TEST") E S %=0 G USERQ
;
;Call ZSLOT for count of ZSLOT users
S %="N/A" I $T(ENTCLUST^ZSLOT)'="" D ENTCLUST^ZSLOT S %=Y
USERQ Q %
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXMUT5B 1450 printed Oct 16, 2024@18:14:20 Page 2
XMUT5B ;(WASH ISC)/CAP-Gather Delivery Queue Data ;04/17/2002 12:05
+1 ;;8.0;MailMan;;Jun 28, 2002
+2 ;;XX.XX
+3 ;
+4 ;M("O") & R("O") = #items ^ timestamp of oldest ^ #deliveries
+5 ;M("T") & R("T") = same as "O" above except for all messages/responses
GO ;S X="USERY^XMUT5B",@^%ZOSF("TRAP"),X=$ZC(%SPAWN,"SUBMIT/QUE=FORUM7_BATCH LEEUSER.COM")
GP ;
+1 NEW I,XMFWD
+2 ; (f)
SET XMFWD=$$EZBLD^DIALOG(36223)
+3 SET M("T")=0
+4 FOR I=1:1:10
SET M("O",I)=0
IF $DATA(^XMBPOST("M",I))
DO Q("M",.M,I)
+5 SET R("T")=0
+6 FOR I=1:1:10
SET R("O",I)=0
IF $DATA(^XMBPOST("R",I))
DO Q("R",.R,I)
+7 QUIT
Q(XMGROUP,XMQ,I) ;
+1 NEW XMREC,XMTSTAMP,XMZ
+2 SET XMREC=$GET(^XMBPOST(XMGROUP,I))
SET XMTSTAMP=$ORDER(^(I,0))
SET XMZ=$SELECT(XMTSTAMP:$ORDER(^(XMTSTAMP,"")),1:"")
+3 IF XMGROUP="M"
IF XMZ
Begin DoDot:1
+4 ; if [U, then it's a forward
IF XMZ[U
SET XMZ=$PIECE(XMZ,U,1)_U_XMFWD
+5 IF '$TEST
SET XMZ=XMZ_U
+6 ; latest delivery
SET XMZ=XMZ_U_$ORDER(^XMB(3.7,"M",$PIECE(XMZ,U,1),""),-1)
End DoDot:1
+7 SET XMQ("O",I)=+XMREC_U_XMTSTAMP_U_$PIECE(XMREC,U,2)_U_XMZ
+8 if 'XMREC
QUIT
+9 SET $PIECE(XMQ("T"),U)=$PIECE(XMQ("T"),U)+XMREC
SET $PIECE(XMQ("T"),U,3)=$PIECE(XMQ("T"),U,3)+$PIECE(XMREC,U,2)
+10 IF $SELECT('$PIECE(XMQ("T"),U,2):1,$PIECE(XMQ("T"),U,2)>XMTSTAMP:1,1:0)
SET $PIECE(XMQ("T"),U,2)=XMTSTAMP
+11 QUIT
USERS(%) ;Get the number of ZSLOT users
+1 ;%=1 do not display output, %=0 display
+2 NEW X,A,B,C,Y,Z,ZSLOTDSP
SET ZSLOTDSP=%
+3 ;
+4 ;First -- is the ZSLOT software installed ?
+5 SET X="ZSLOT"
XECUTE ^%ZOSF("TEST")
IF '$TEST
SET %=0
GOTO USERQ
+6 ;
+7 ;Call ZSLOT for count of ZSLOT users
+8 SET %="N/A"
IF $TEXT(ENTCLUST^ZSLOT)'=""
DO ENTCLUST^ZSLOT
SET %=Y
USERQ QUIT %