source: WorldVistAEHR/trunk/r/MAILMAN-XM/XMUT1.m@ 836

Last change on this file since 836 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1XMUT1 ;(WASH ISC)/CAP-Recover msgs for a user ;04/17/2002 11:49
2 ;;8.0;MailMan;;Jun 28, 2002
3 ; Entry points used by MailMan options (not covered by DBIA):
4 ; A XMUT-REC-FIND
5 ; G XMUT-REC-DELIVER
6 Q
7A ;
8 W !!,"WE WILL FIND THE MESSAGES AND STORE THEM IN ^TMP('XMUT1'..."
9 W !,"LATER WE WILL LOAD THEM INTO PERSON'S MAILBOX.",!!
10 W !!,"This routine recovers 'ALL' messages that the user has not been"
11 W !,"terminated from. It will not recover some messages that were"
12 W !,"sent after reinstatement if the user previously lost Mail-Baskets."
13 S DIR(0)="Y",DIR("B")="N",DIR("A")="THIS MAY TAKE A LONG TIME.... DO YOU WISH TO CONTINUE" D ^DIR K DIR,DIRUT G EXIT:"yY"'[$E(X)!(X="")
14 S XMA0=^DD("DD")
15B S DIC("A")="Enter the USER for whom you wish to recover messages: "
16 S DIC="^VA(200,",DIC(0)="AEQZM" D ^DIC
17 K DIC I "^"[$E(X) G EXIT
18 I Y<1 W !,"Enter '^' to abort or a Valid User who has a Mailbox." G B
19 I '$D(^XMB(3.7,+Y,2,1,0)) W $C(7),"You cannot recover messages for this user (no Mailbox)." G B
20 S XMC0=+Y,XMB0=Y(0) K Y
21 S DIR(0)="Y",DIR("B")="NO",DIR("A")="DO YOU MEAN '"_$P(XMB0,"^")_"' "
22 D ^DIR K DIR,DIRUT I "Yy"'[$E(X)!(X="") G B
23 S (F,A,G)=0,D=XMC0 K XMC0
24 W !!,"*=100 MESSAGES PROCESSED",!!
25L S A=$O(^XMB(3.7,"M",A)) G Q:'A,L:$D(^(A,D)) S G=G+1 W:G#100=0 "*" S E=$O(^XMB(3.9,A,1,"C",D,0)) G L:'E,L:$D(^XMB(3.9,A,1,E,"D"))
26 S F=F+1,X=^XMB(3.9,A,0),^TMP("XMUT1",D,A)=X W !,$P(X,"^"),!
27 G L
28Q W !!,G," MESSAGES PROCESSED, ",F," MESSAGES FOUND"
29 K %1,A,D,E,F,G,X,XMA0,XMB0,Y,Z,%,%H,%DT
30 Q
31QQ S (A,G,F)=0,C=1,XMA0=^DD("DD") H 3600 D L G H^XUS
32 ;
33G ;LOAD DOCUMENTS FOUND INTO USER'S 'IN' BOX
34 S (J,C,F)="" W !!,"CHOOSE FROM:",!
35 F I=0:0 S I=$O(^TMP("XMUT1",I)) Q:'I I $D(^VA(200,I,0)) W !,$J(I,8)," ",$$NAME^XMXUTIL(I) I 'J S J=I
36 I 'J W !!!,"NONE RECOVERED FOR ANYBODY !!!" K C,F,I,J,X Q
37F W !!,"WHICH ONE: ",J,"// " R X:DTIME I X="" S X=J
38 G E:"^"[$E(X) I X="?" D H1^XMUT1A G F
39 I X="??" G G
40 S D=X I '$D(^TMP("XMUT1",D)) W " << NOT ON LIST !!!",$C(7) G G
41 W !!,"RECOVERING MESSAGES ('+'=RECOVERED, '.'=MESSAGE PROCESSED)",!!
42 S D=X,(C,F)=0
43P S A=$O(^TMP("XMUT1",D,0)) G QQQ:'A W "." I $X>77 W !
44 S C=C+1 W "+" G T:$D(^XMB(3.7,"M",A,D)),T:'$D(^XMB(3.9,A))
45 S F=F+1
46 L +^XMB(3.7,D)
47 D PUTMSG^XMXMSGS2(D,1,"IN",A)
48 L -^XMB(3.7,D)
49T K ^TMP("XMUT1",D,A) G P
50QQQ W !!,C," POTENTIAL ENTRIES PROCESSED. ",F," MESSAGES RECOVERED.",!!
51E K %,%1,A,C,D,F,I,J,Y,Z,%H
52 Q
53EXIT K X1,X2
54 Q
55 ;
56 ;LIST MESSAGES IN MAILBOXES OF DUZ
57M G MBOX^XMJBL
58 Q
Note: See TracBrowser for help on using the repository browser.