XMXLIST2 ;ISC-SF/GMB-List message: multiple conditions (cont.) ;08/30/2000 11:01
;;8.0;MailMan;;Jun 28, 2002
; Look in just one of the user's baskets.
NEW1(XMDUZ,XMK,XMKN,XMTYPE,XMORDER,XMFLDS,XMAMT,XMSTART,XMF,XMTROOT) ; New messages in 1 basket
N XMCNT,XMZ
S XMKN=$P(^XMB(3.7,XMDUZ,2,XMK,0),U,1)
S XMCNT=0
S XMZ=$G(XMSTART("XMZ"))
F S XMZ=$O(^XMB(3.7,XMDUZ,XMTYPE,XMK,XMZ),XMORDER) Q:'XMZ D Q:XMCNT=XMAMT
. I '$D(^XMB(3.7,XMDUZ,2,XMK,1,XMZ,0)) D ADDITN^XMUT4A(XMDUZ,XMTYPE,XMK,XMZ)
. I '$D(^XMB(3.9,XMZ,0)) D ZAPIT^XMXMSGS2(XMDUZ,XMK,XMZ) Q
. I $D(XMF) Q:'$$GOODMSG^XMJMFB(XMDUZ,XMK,XMZ,.XMF)
. S XMCNT=XMCNT+1
. S @(XMTROOT_XMCNT_")")=XMZ
. Q:'$D(XMFLDS)
. D FIELDS^XMXLIST1(XMDUZ,XMK,XMKN,XMZ,.XMFLDS,XMTROOT,XMCNT)
. I XMFLDS["SEQN" D KSEQN^XMXLIST1(XMDUZ,XMK,XMZ,.XMFLDS,XMTROOT,XMCNT)
S XMSTART("XMZ")=XMZ
S @(XMTROOT_"0)")=XMCNT_U_XMAMT
; Any more?
I 'XMZ S @(XMTROOT_"0)")=@(XMTROOT_"0)")_"^0" Q
I '$O(^XMB(3.7,XMDUZ,XMTYPE,XMK,XMZ),XMORDER) S @(XMTROOT_"0)")=@(XMTROOT_"0)")_"^0" Q
I '$D(XMF) S @(XMTROOT_"0)")=@(XMTROOT_"0)")_"^1" Q
N XMORE
S XMORE=0
F S XMZ=$O(^XMB(3.7,XMDUZ,XMTYPE,XMK,XMZ),XMORDER) Q:'XMZ D Q:XMORE
. I '$D(^XMB(3.7,XMDUZ,2,XMK,1,XMZ,0)) D ADD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MORE=0
F S XMZ=$O(^XMB(3.7,XMDUZ,2,XMK,1,XMZ),XMORDER) Q:'XMZ D Q:XMORE
. I '$D(^XMB(3.9,XMZ,0)) D ZAPIT^XMXMSGS2(XMDUZ,XMK,XMZ) Q
. I $$GOODMSG^XMJMFB(XMDUZ,XMK,XMZ,.XMF) S XMORE=1
S @(XMTROOT_"0)")=@(XMTROOT_"0)")_U_XMORE
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXMXLIST2 3822 printed Dec 13, 2024@02:14:13 Page 2
XMXLIST2 ;ISC-SF/GMB-List message: multiple conditions (cont.) ;08/30/2000 11:01
+1 ;;8.0;MailMan;;Jun 28, 2002
+2 ; Look in just one of the user's baskets.
NEW1(XMDUZ,XMK,XMKN,XMTYPE,XMORDER,XMFLDS,XMAMT,XMSTART,XMF,XMTROOT) ; New messages in 1 basket
+1 NEW XMCNT,XMZ
+2 SET XMKN=$PIECE(^XMB(3.7,XMDUZ,2,XMK,0),U,1)
+3 SET XMCNT=0
+4 SET XMZ=$GET(XMSTART("XMZ"))
+5 FOR
SET XMZ=$ORDER(^XMB(3.7,XMDUZ,XMTYPE,XMK,XMZ),XMORDER)
if 'XMZ
QUIT
Begin DoDot:1
+6 IF '$DATA(^XMB(3.7,XMDUZ,2,XMK,1,XMZ,0))
DO ADDITN^XMUT4A(XMDUZ,XMTYPE,XMK,XMZ)
+7 IF '$DATA(^XMB(3.9,XMZ,0))
DO ZAPIT^XMXMSGS2(XMDUZ,XMK,XMZ)
QUIT
+8 IF $DATA(XMF)
if '$$GOODMSG^XMJMFB(XMDUZ,XMK,XMZ,.XMF)
QUIT
+9 SET XMCNT=XMCNT+1
+10 SET @(XMTROOT_XMCNT_")")=XMZ
+11 if '$DATA(XMFLDS)
QUIT
+12 DO FIELDS^XMXLIST1(XMDUZ,XMK,XMKN,XMZ,.XMFLDS,XMTROOT,XMCNT)
+13 IF XMFLDS["SEQN"
DO KSEQN^XMXLIST1(XMDUZ,XMK,XMZ,.XMFLDS,XMTROOT,XMCNT)
End DoDot:1
if XMCNT=XMAMT
QUIT
+14 SET XMSTART("XMZ")=XMZ
+15 SET @(XMTROOT_"0)")=XMCNT_U_XMAMT
+16 ; Any more?
+17 IF 'XMZ
SET @(XMTROOT_"0)")=@(XMTROOT_"0)")_"^0"
QUIT
+18 IF '$ORDER(^XMB(3.7,XMDUZ,XMTYPE,XMK,XMZ),XMORDER)
SET @(XMTROOT_"0)")=@(XMTROOT_"0)")_"^0"
QUIT
+19 IF '$DATA(XMF)
SET @(XMTROOT_"0)")=@(XMTROOT_"0)")_"^1"
QUIT
+20 NEW XMORE
+21 SET XMORE=0
+22 FOR
SET XMZ=$ORDER(^XMB(3.7,XMDUZ,XMTYPE,XMK,XMZ),XMORDER)
if 'XMZ
QUIT
Begin DoDot:1
+23 IF '$DATA(^XMB(3.7,XMDUZ,2,XMK,1,XMZ,0))
DO ADDITN^XMUT4A(XMDUZ,XMTYPE,XMK,XMZ)
+24 IF '$DATA(^XMB(3.9,XMZ,0))
DO ZAPIT^XMXMSGS2(XMDUZ,XMK,XMZ)
QUIT
+25 IF $$GOODMSG^XMJMFB(XMDUZ,XMK,XMZ,.XMF)
SET XMORE=1
End DoDot:1
if XMORE
QUIT
+26 SET @(XMTROOT_"0)")=@(XMTROOT_"0)")_U_XMORE
+27 QUIT
REG1C(XMDUZ,XMK,XMKN,XMORDER,XMFLDS,XMAMT,XMSTART,XMF,XMTROOT) ; Messages (by C-xref) in one basket
+1 NEW XMCNT,XMKZ,XMZ
+2 SET XMCNT=0
+3 SET XMKZ=$GET(XMSTART("XMKZ"))
+4 FOR
SET XMKZ=$ORDER(^XMB(3.7,XMDUZ,2,XMK,1,"C",XMKZ),XMORDER)
if 'XMKZ
QUIT
SET XMZ=$ORDER(^(XMKZ,""))
Begin DoDot:1
+5 IF '$DATA(^XMB(3.7,XMDUZ,2,XMK,1,XMZ,0))
DO ADDITC^XMUT4A(XMDUZ,XMK,XMZ,XMKZ)
+6 IF '$DATA(^XMB(3.9,XMZ,0))
DO ZAPIT^XMXMSGS2(XMDUZ,XMK,XMZ)
QUIT
+7 IF $DATA(XMF)
if '$$GOODMSG^XMJMFB(XMDUZ,XMK,XMZ,.XMF)
QUIT
+8 SET XMCNT=XMCNT+1
+9 SET @(XMTROOT_XMCNT_")")=XMZ
+10 if '$DATA(XMFLDS)
QUIT
+11 DO FIELDS^XMXLIST1(XMDUZ,XMK,XMKN,XMZ,.XMFLDS,XMTROOT,XMCNT)
+12 IF FIELDS["SEQN"
DO SEQN^XMXLIST1(XMDUZ,XMKZ,.XMFLDS,XMTROOT,XMCNT)
End DoDot:1
if XMCNT=XMAMT
QUIT
+13 SET XMSTART("XMKZ")=XMKZ
+14 SET @(XMTROOT_"0)")=XMCNT_U_XMAMT
+15 ; Any more?
+16 IF 'XMKZ
SET @(XMTROOT_"0)")=@(XMTROOT_"0)")_"^0"
QUIT
+17 IF '$ORDER(^XMB(3.7,XMDUZ,2,XMK,1,"C",XMKZ),XMORDER)
SET @(XMTROOT_"0)")=@(XMTROOT_"0)")_"^0"
QUIT
+18 IF '$DATA(XMF)
SET @(XMTROOT_"0)")=@(XMTROOT_"0)")_"^1"
QUIT
+19 NEW XMORE
+20 SET XMORE=0
+21 FOR
SET XMKZ=$ORDER(^XMB(3.7,XMDUZ,2,XMK,1,"C",XMKZ),XMORDER)
if 'XMKZ
QUIT
SET XMZ=$ORDER(^(XMKZ,""))
Begin DoDot:1
+22 IF '$DATA(^XMB(3.7,XMDUZ,2,XMK,1,XMZ,0))
DO ADDITC^XMUT4A(XMDUZ,XMK,XMZ,XMKZ)
+23 IF '$DATA(^XMB(3.9,XMZ,0))
DO ZAPIT^XMXMSGS2(XMDUZ,XMK,XMZ)
QUIT
+24 IF $$GOODMSG^XMJMFB(XMDUZ,XMK,XMZ,.XMF)
SET XMORE=1
End DoDot:1
if XMORE
QUIT
+25 SET @(XMTROOT_"0)")=@(XMTROOT_"0)")_U_XMORE
+26 QUIT
REG1Z(XMDUZ,XMK,XMKN,XMORDER,XMFLDS,XMAMT,XMSTART,XMF,XMTROOT) ; Messages (by IEN) in one basket
+1 NEW XMCNT,XMZ
+2 SET XMCNT=0
+3 SET XMZ=$GET(XMSTART("XMZ"))
+4 IF +XMZ=0
SET XMZ=0
IF XMORDER=-1
SET XMZ=":"
+5 FOR
SET XMZ=$ORDER(^XMB(3.7,XMDUZ,2,XMK,1,XMZ),XMORDER)
if 'XMZ
QUIT
Begin DoDot:1
+6 IF '$DATA(^XMB(3.9,XMZ,0))
DO ZAPIT^XMXMSGS2(XMDUZ,XMK,XMZ)
QUIT
+7 IF $DATA(XMF)
if '$$GOODMSG^XMJMFB(XMDUZ,XMK,XMZ,.XMF)
QUIT
+8 SET XMCNT=XMCNT+1
+9 SET @(XMTROOT_XMCNT_")")=XMZ
+10 if '$DATA(XMFLDS)
QUIT
+11 DO FIELDS^XMXLIST1(XMDUZ,XMK,XMKN,XMZ,.XMFLDS,XMTROOT,XMCNT)
+12 IF XMFLDS["SEQN"
DO KSEQN^XMXLIST1(XMDUZ,XMK,XMZ,.XMFLDS,XMTROOT,XMCNT)
End DoDot:1
if XMCNT=XMAMT
QUIT
+13 SET XMSTART("XMZ")=XMZ
+14 SET @(XMTROOT_"0)")=XMCNT_U_XMAMT
+15 ; Any more?
+16 IF 'XMZ
SET @(XMTROOT_"0)")=@(XMTROOT_"0)")_"^0"
QUIT
+17 IF '$ORDER(^XMB(3.7,XMDUZ,2,XMK,1,XMZ),XMORDER)
SET @(XMTROOT_"0)")=@(XMTROOT_"0)")_"^0"
QUIT
+18 IF '$DATA(XMF)
SET @(XMTROOT_"0)")=@(XMTROOT_"0)")_"^1"
QUIT
+19 NEW XMORE
+20 SET XMORE=0
+21 FOR
SET XMZ=$ORDER(^XMB(3.7,XMDUZ,2,XMK,1,XMZ),XMORDER)
if 'XMZ
QUIT
Begin DoDot:1
+22 IF '$DATA(^XMB(3.9,XMZ,0))
DO ZAPIT^XMXMSGS2(XMDUZ,XMK,XMZ)
QUIT
+23 IF $$GOODMSG^XMJMFB(XMDUZ,XMK,XMZ,.XMF)
SET XMORE=1
End DoDot:1
if XMORE
QUIT
+24 SET @(XMTROOT_"0)")=@(XMTROOT_"0)")_U_XMORE
+25 QUIT