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MWHICH,",",I)
. Q:'XMRANGE
. F XMKZ=$P(XMRANGE,"-",1):1:$S(XMRANGE["-":$P(XMRANGE,"-",2),1:XMRANGE) D
. . S XMZ=$P($G(^TMP("XM",$J,"MSG",XMKZ)),U,3) Q:'XMZ
. . I J=0 S J=1,XMZLIST(1)=XMZ Q
. . I $L(XMZLIST(J))+$L(XMZ)>240 S J=J+1,XMZLIST(J)=XMZ Q
. . S XMZLIST(J)=XMZLIST(J)_","_XMZ
Q
ACTWHICH(XMDUZ,XMTMP,XMKALL,XMK,XMRTN,XMPROMPT,XMSUM,XMCONFRM,XMMSG,XMABORT) ;,XMKTO)
N XMWHICH
D WHICH(XMPROMPT,XMCONFRM,.XMWHICH,.XMABORT) Q:XMABORT
D ACTMSG(XMDUZ,XMTMP,XMKALL,XMK,XMWHICH,XMRTN,XMSUM,.XMMSG)
Q
WHICH(XMPROMPT,XMCONFRM,XMWHICH,XMABORT) ;
N DIR,Y,XMHI,XMLO
S XMLO=$O(^TMP("XM",$J,"MSG",""))
S XMHI=$O(^TMP("XM",$J,"MSG",""),-1)
S DIR("A")=$$EZBLD^DIALOG(XMPROMPT) ; ... which messages?
S DIR("??")="XM-U-M-CHOOSE RANGE"
S DIR(0)="LC^"_XMLO_":"_XMHI
D ^DIR I $D(DIRUT) S XMABORT=1 Q
S XMWHICH=Y
I XMCONFRM D CONFIRM^XMJMOR(XMCONFRM,.XMABORT)
Q
ACTMSG(XMDUZ,XMTMP,XMKALL,XMK,XMKZA,XMRTN,XMSUM,XMMSG) ;,XMKTO)
; XMKZA Array of msg numbers DEL("1-3,7,11-15")
; XMKZL List of msg numbers 1-3,7,11-15
; (It is OK if the list ends with a comma)
; XMKZR Range of msg numbers 1-3
; XMKZ1 First number in range 1
; XMKZN Last number in range 3
N XMKZ,XMREC,XMKZL,XMKZR,XMI,XMKZ1,XMKZN,XMZ,XMCNT,XMPIECES
S XMCNT=0
; is this an array or a variable?
I $G(XMKZA)]"",$O(XMKZA(""))="" S XMKZA(XMKZA)=""
S XMKZL=""
F S XMKZL=$O(XMKZA(XMKZL)) Q:XMKZL="" D
. S XMPIECES=$L(XMKZL,",")
. S:'$P(XMKZL,",",XMPIECES) XMPIECES=XMPIECES-1
. F XMI=1:1:XMPIECES D
. . S XMKZR=$P(XMKZL,",",XMI)
. . I XMKZR["-" D Q
. . . ; deal with a range of msg #s
. . . S XMKZ1=$P(XMKZR,"-",1)
. . . S XMKZN=$P(XMKZR,"-",2)
. . . S XMKZ=XMKZ1-.1
. . . I XMTMP D Q
. . . . F S XMKZ=$O(^TMP("XM",$J,"MSG",XMKZ)) Q:XMKZ>XMKZN!'XMKZ D
. . . . . S XMREC=^TMP("XM",$J,"MSG",XMKZ)
. . . . . S:XMKALL XMK=$P(XMREC,U,1)
. . . . . S XMZ=$P(XMREC,U,3) Q:'XMZ
. . . . . D @XMRTN ;(XMDUZ,XMK,XMZ)
. . . F S XMKZ=$O(^XMB(3.7,XMDUZ,2,XMK,1,"C",XMKZ)) Q:XMKZ>XMKZN!'XMKZ D
. . . . S XMZ=$O(^XMB(3.7,XMDUZ,2,XMK,1,"C",XMKZ,0)) Q:'XMZ
. . . . D @XMRTN ;(XMDUZ,XMK,XMZ)
. . S XMKZ=XMKZR
. . I XMTMP D Q
. . . S XMREC=$G(^TMP("XM",$J,"MSG",XMKZ))
. . . I XMREC="" S XMZ=0 Q
. . . S:XMKALL XMK=$P(XMREC,U,1)
. . . S XMZ=$P(XMREC,U,3) Q:'XMZ
. . . D @XMRTN ;(XMDUZ,XMK,XMZ)
. . S XMZ=$O(^XMB(3.7,XMDUZ,2,XMK,1,"C",XMKZ,0)) Q:'XMZ
. . D @XMRTN ;(XMDUZ,XMK,XMZ)
S XMMSG=$$EZBLD^DIALOG($S(XMCNT=1:XMSUM+.1,1:XMSUM),XMCNT)
D INCRDECR^XMXMSGS(XMDUZ,.XMCNT)
Q
SELMSG(XMDUZ,XMTMP,XMKALL,XMK,XMRTN,XMSUM,XMCONFRM,XMMSG,XMABORT) ;,XMKTO,XMWHEN)
I XMCONFRM D CONFIRM^XMJMOR(XMCONFRM,.XMABORT) Q:XMABORT
N XMCNT,XMKZ,XMREC,XMZ
S (XMCNT,XMKZ)=0
F S XMKZ=$O(^TMP("XM",$J,".",XMKZ)) Q:'XMKZ D
. I XMTMP D Q
. . S XMREC=^TMP("XM",$J,"MSG",XMKZ)
. . S:XMKALL XMK=$P(XMREC,U,1)
. . S XMZ=$P(XMREC,U,3) Q:'XMZ
. . D @XMRTN ;(XMDUZ,XMK,XMZ)
. S XMZ=$O(^XMB(3.7,XMDUZ,2,XMK,1,"C",XMKZ,"")) Q:'XMZ
. D @XMRTN ;(XMDUZ,XMK,XMZ)
S XMMSG=$$EZBLD^DIALOG($S(XMCNT=1:XMSUM+.1,1:XMSUM),XMCNT)
D INCRDECR^XMXMSGS(XMDUZ,.XMCNT)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXMJMORX1 5496 printed Oct 16, 2024@18:12:54 Page 2
XMJMORX1 ;ISC-SF/GMB-^XMJMORX (cont.) ;09/16/2002 11:16
+1 ;;8.0;MailMan;**5**;Jun 28, 2002
+2 ;DELMSG(XMDUZ,XMK,XMKZ,XMZ,XMCNT)
XDEL ;
+1 if 'XMK
QUIT
+2 KILL XMERR,^TMP("XMERR",$JOB)
+3 DO DEL^XMXMSGS2(XMDUZ,XMK,XMZ,.XMCNT)
+4 IF $DATA(XMERR)
DO ZSHOW^XMJERR
QUIT
+5 IF XMKALL
IF $GET(XMTYPE)'["N"
Begin DoDot:1
+6 ; "WASTE" / "* N/A *"
SET ^TMP("XM",$JOB,"MSG",XMKZ)=$SELECT(XMK'=.5:".5^"_$$EZBLD^DIALOG(37004),1:"0^"_$$EZBLD^DIALOG(34014))_U_XMZ
End DoDot:1
QUIT
+7 if XMTMP
KILL ^TMP("XM",$JOB,"MSG",XMKZ)
+8 if $DATA(^TMP("XM",$JOB,".",XMKZ))
KILL ^TMP("XM",$JOB,".",XMKZ)
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A(XMERR)
DO ZSHOW^XMJERR
QUIT
+4 IF XMKALL
Begin DoDot:1
+5 SET ^TMP("XM",$JOB,"MSG",XMKZ)=XMKTO_U_XMKNTO_U_XMZ
End DoDot:1
QUIT
+6 KILL ^TMP("XM",$JOB,"MSG",XMKZ)
+7 ;K:$D(^TMP("XM",$J,".",XMKZ)) ^TMP("XM",$J,".",XMKZ)
+8 QUIT
+9 ;TERMMSG(XMDUZ,XMK,XMKZ,XMZ,XMCNT)
XTERM ;
+1 if 'XMK
QUIT
+2 KILL XMERR,^TMP("XMERR",$JOB)
+3 DO TERM^XMXMSGS2(XMDUZ,XMK,XMZ,.XMCNT)
+4 IF $DATA(XMERR)
DO ZSHOW^XMJERR
QUIT
+5 IF XMKALL
IF $GET(XMTYPE)'["N"
Begin DoDot:1
+6 ; "WASTE" / "* N/A *"
SET ^TMP("XM",$JOB,"MSG",XMKZ)=$SELECT(XMK'=.5:".5^"_$$EZBLD^DIALOG(37004),1:"0^"_$$EZBLD^DIALOG(34014))_U_XMZ
End DoDot:1
QUIT
+7 if XMTMP
KILL ^TMP("XM",$JOB,"MSG",XMKZ)
+8 if $DATA(^TMP("XM",$JOB,".",XMKZ))
KILL ^TMP("XM",$JOB,".",XMKZ)
+9 QUIT
LISTSEL(XMZLIST) ;
+1 NEW XMKZ,J,XMZ
+2 SET (XMKZ,J)=0
+3 FOR
SET XMKZ=$ORDER(^TMP("XM",$JOB,".",XMKZ))
if 'XMKZ
QUIT
Begin DoDot:1
+4 SET XMZ=$PIECE(^TMP("XM",$JOB,"MSG",XMKZ),U,3)
+5 IF J=0
SET J=1
SET XMZLIST(1)=XMZ
QUIT
+6 IF $LENGTH(XMZLIST(J))+$LENGTH(XMZ)>240
SET J=J+1
SET XMZLIST(J)=XMZ
QUIT
+7 SET XMZLIST(J)=XMZLIST(J)_","_XMZ
End DoDot:1
+8 QUIT
LIST(XMWHICH,XMZLIST) ;
+1 NEW I,J,XMRANGE,XMKZ,XMZ
+2 SET J=0
+3 FOR I=1:1:$LENGTH(XMWHICH,",")
Begin DoDot:1
+4 SET XMRANGE=$PIECE(XMWHICH,",",I)
+5 if 'XMRANGE
QUIT
+6 FOR XMKZ=$PIECE(XMRANGE,"-",1):1:$SELECT(XMRANGE["-":$PIECE(XMRANGE,"-",2),1:XMRANGE)
Begin DoDot:2
+7 SET XMZ=$PIECE($GET(^TMP("XM",$JOB,"MSG",XMKZ)),U,3)
if 'XMZ
QUIT
+8 IF J=0
SET J=1
SET XMZLIST(1)=XMZ
QUIT
+9 IF $LENGTH(XMZLIST(J))+$LENGTH(XMZ)>240
SET J=J+1
SET XMZLIST(J)=XMZ
QUIT
+10 SET XMZLIST(J)=XMZLIST(J)_","_XMZ
End DoDot:2
End DoDot:1
+11 QUIT
ACTWHICH(XMDUZ,XMTMP,XMKALL,XMK,XMRTN,XMPROMPT,XMSUM,XMCONFRM,XMMSG,XMABORT) ;,XMKTO)
+1 NEW XMWHICH
+2 DO WHICH(XMPROMPT,XMCONFRM,.XMWHICH,.XMABORT)
if XMABORT
QUIT
+3 DO ACTMSG(XMDUZ,XMTMP,XMKALL,XMK,XMWHICH,XMRTN,XMSUM,.XMMSG)
+4 QUIT
WHICH(XMPROMPT,XMCONFRM,XMWHICH,XMABORT) ;
+1 NEW DIR,Y,XMHI,XMLO
+2 SET XMLO=$ORDER(^TMP("XM",$JOB,"MSG",""))
+3 SET XMHI=$ORDER(^TMP("XM",$JOB,"MSG",""),-1)
+4 ; ... which messages?
SET DIR("A")=$$EZBLD^DIALOG(XMPROMPT)
+5 SET DIR("??")="XM-U-M-CHOOSE RANGE"
+6 SET DIR(0)="LC^"_XMLO_":"_XMHI
+7 DO ^DIR
IF $DATA(DIRUT)
SET XMABORT=1
QUIT
+8 SET XMWHICH=Y
+9 IF XMCONFRM
DO CONFIRM^XMJMOR(XMCONFRM,.XMABORT)
+10 QUIT
ACTMSG(XMDUZ,XMTMP,XMKALL,XMK,XMKZA,XMRTN,XMSUM,XMMSG) ;,XMKTO)
+1 ; XMKZA Array of msg numbers DEL("1-3,7,11-15")
+2 ; XMKZL List of msg numbers 1-3,7,11-15
+3 ; (It is OK if the list ends with a comma)
+4 ; XMKZR Range of msg numbers 1-3
+5 ; XMKZ1 First number in range 1
+6 ; XMKZN Last number in range 3
+7 NEW XMKZ,XMREC,XMKZL,XMKZR,XMI,XMKZ1,XMKZN,XMZ,XMCNT,XMPIECES
+8 SET XMCNT=0
+9 ; is this an array or a variable?
+10 IF $GET(XMKZA)]""
IF $ORDER(XMKZA(""))=""
SET XMKZA(XMKZA)=""
+11 SET XMKZL=""
+12 FOR
SET XMKZL=$ORDER(XMKZA(XMKZL))
if XMKZL=""
QUIT
Begin DoDot:1
+13 SET XMPIECES=$LENGTH(XMKZL,",")
+14 if '$PIECE(XMKZL,",",XMPIECES)
SET XMPIECES=XMPIECES-1
+15 FOR XMI=1:1:XMPIECES
Begin DoDot:2
+16 SET XMKZR=$PIECE(XMKZL,",",XMI)
+17 IF XMKZR["-"
Begin DoDot:3
+18 ; deal with a range of msg #s
+19 SET XMKZ1=$PIECE(XMKZR,"-",1)
+20 SET XMKZN=$PIECE(XMKZR,"-",2)
+21 SET XMKZ=XMKZ1-.1
+22 IF XMTMP
Begin DoDot:4
+23 FOR
SET XMKZ=$ORDER(^TMP("XM",$JOB,"MSG",XMKZ))
if XMKZ>XMKZN!'XMKZ
QUIT
Begin DoDot:5
+24 SET XMREC=^TMP("XM",$JOB,"MSG",XMKZ)
+25 if XMKALL
SET XMK=$PIECE(XMREC,U,1)
+26 SET XMZ=$PIECE(XMREC,U,3)
if 'XMZ
QUIT
+27 ;(XMDUZ,XMK,XMZ)
DO @XMRTN
End DoDot:5
End DoDot:4
QUIT
+28 FOR
SET XMKZ=$ORDER(^XMB(3.7,XMDUZ,2,XMK,1,"C",XMKZ))
if XMKZ>XMKZN!'XMKZ
QUIT
Begin DoDot:4
+29 SET XMZ=$ORDER(^XMB(3.7,XMDUZ,2,XMK,1,"C",XMKZ,0))
if 'XMZ
QUIT
+30 ;(XMDUZ,XMK,XMZ)
DO @XMRTN
End DoDot:4
End DoDot:3
QUIT
+31 SET XMKZ=XMKZR
+32 IF XMTMP
Begin DoDot:3
+33 SET XMREC=$GET(^TMP("XM",$JOB,"MSG",XMKZ))
+34 IF XMREC=""
SET XMZ=0
QUIT
+35 if XMKALL
SET XMK=$PIECE(XMREC,U,1)
+36 SET XMZ=$PIECE(XMREC,U,3)
if 'XMZ
QUIT
+37 ;(XMDUZ,XMK,XMZ)
DO @XMRTN
End DoDot:3
QUIT
+38 SET XMZ=$ORDER(^XMB(3.7,XMDUZ,2,XMK,1,"C",XMKZ,0))
if 'XMZ
QUIT
+39 ;(XMDUZ,XMK,XMZ)
DO @XMRTN
End DoDot:2
End DoDot:1
+40 SET XMMSG=$$EZBLD^DIALOG($SELECT(XMCNT=1:XMSUM+.1,1:XMSUM),XMCNT)
+41 DO INCRDECR^XMXMSGS(XMDUZ,.XMCNT)
+42 QUIT
SELMSG(XMDUZ,XMTMP,XMKALL,XMK,XMRTN,XMSUM,XMCONFRM,XMMSG,XMABORT) ;,XMKTO,XMWHEN)
+1 IF XMCONFRM
DO CONFIRM^XMJMOR(XMCONFRM,.XMABORT)
if XMABORT
QUIT
+2 NEW XMCNT,XMKZ,XMREC,XMZ
+3 SET (XMCNT,XMKZ)=0
+4 FOR
SET XMKZ=$ORDER(^TMP("XM",$JOB,".",XMKZ))
if 'XMKZ
QUIT
Begin DoDot:1
+5 IF XMTMP
Begin DoDot:2
+6 SET XMREC=^TMP("XM",$JOB,"MSG",XMKZ)
+7 if XMKALL
SET XMK=$PIECE(XMREC,U,1)
+8 SET XMZ=$PIECE(XMREC,U,3)
if 'XMZ
QUIT
+9 ;(XMDUZ,XMK,XMZ)
DO @XMRTN
End DoDot:2
QUIT
+10 SET XMZ=$ORDER(^XMB(3.7,XMDUZ,2,XMK,1,"C",XMKZ,""))
if 'XMZ
QUIT
+11 ;(XMDUZ,XMK,XMZ)
DO @XMRTN
End DoDot:1
+12 SET XMMSG=$$EZBLD^DIALOG($SELECT(XMCNT=1:XMSUM+.1,1:XMSUM),XMCNT)
+13 DO INCRDECR^XMXMSGS(XMDUZ,.XMCNT)
+14 QUIT