XMVGRP ;ISC-SF/GMB-Group creation/enrollment ;03/07/2002 07:01
;;8.0;MailMan;;Jun 28, 2002
; Entry points used by MailMan options (not covered by DBIA):
; ENLOCAL XMxxxxx - Add local users to mail groups
ENLOCAL1(XMXQUSER) ; Add local user(s) to group(s) - called from Kernel
; XMXQUSER - first user being added (duz or name)
I '$D(XMV) N XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
D INITAPI^XMVVITAE
ENLOCAL ; Add local user(s) to mail group(s).
N XMGRP,XMMBR,XMINSTR,XMTSK,XMTO,XMABORT
S XMABORT=0
D ENGRP(.XMGRP,.XMABORT) Q:XMABORT!'$D(XMGRP) ; select groups
D ENUSER(.XMMBR,.XMABORT,.XMXQUSER) Q:XMABORT ; select users
D ENCONF(.XMGRP,.XMMBR,.XMABORT) Q:XMABORT ; confirm it
D ADD2GRPZ^XMXGRP(.XMGRP,.XMMBR,.XMTO) ; add users to groups
W !!,$$EZBLD^DIALOG(38233) ; Users have been added to the mail groups
D ENFWD(XMDUZ,.XMINSTR,.XMABORT) Q:XMABORT ; forward msgs?
D FAFMSGS^XMXGRP1(XMDUZ,.XMGRP,.XMTO,.XMINSTR,.XMTSK) ; yup.
D FWDTSK^XMVGROUP(XMTSK) ; tell the user the task number.
Q
ENGRP(XMGRP,XMABORT) ;
N Y
F D Q:Y=-1!XMABORT
. N DIC,DIR,X,XMDEL
. S DIR("A")=$$EZBLD^DIALOG($S($D(XMGRP):38211,1:38210)) ; Another mail group / Allocate mail group
. S DIR("PRE")="I $E(X)=""-"" S XMDEL=1,X=$E(X,2,99)"
. D BLD^DIALOG(38213,"","","DIR(""?"")")
. ;Enter the name of the mail group you wish to allocate.
. ;Precede any mail group name with '-' to remove it.
. ;You'll only be able to select mail groups you're authorized to edit.
. ;Enter ?? for a list of mail groups you've already selected,
. ;and for mail group help.
. S DIR("??")="^D HELPGRP^XMVGRP"
. S DIR(0)="PO^3.8:FEMQ"
. S DIC("S")=$$GRPSCR^XMVGROUP(1)
. D ^DIR I $D(DTOUT)!$D(DUOUT) S XMABORT=1 Q
. Q:Y=-1
. I '$G(XMDEL) S XMGRP($P(Y,U,2))=+Y Q
. I '$D(XMGRP($P(Y,U,2))) W $C(7),$$EZBLD^DIALOG(38214) Q ; ?? Not on current list.
. K XMGRP($P(Y,U,2))
. W $$EZBLD^DIALOG(38215) ; Deleted from current list.
Q
HELPGRP ;
I '$D(XMGRP) W !,$$EZBLD^DIALOG(38216) ; You haven't selected any mail groups yet.
E D SHOWGRP
N DIR,X,Y,DIRUT,DTOUT,DIRUT
S DIR("A")=$$EZBLD^DIALOG(38217) ; Want mail group help
S DIR(0)="Y"
S DIR("B")=$$EZBLD^DIALOG(39053) ; NO
D ^DIR Q:'Y
;D HELP^XMHIG
N DIC,X,Y,DLAYGO
S DIC(0)="AEQM",DIC="^XMB(3.8,"
S DIC("S")=$$GRPSCR^XMVGROUP(1)
F W ! D ^DIC Q:Y<0 D
. D DISPLAY^XMHIG(+Y)
Q
SHOWGRP ;
N XMI,XMJ,XML,XMLN
W !!,$$EZBLD^DIALOG(38218) ; You've selected the following mail groups:
S XML=0,XMI="" F S XMI=$O(XMGRP(XMI)) Q:XMI="" I $L(XMI)>XML S XML=$L(XMI)
S XML=XML+3,XMLN=80\XML
S XMI=""
F XMJ=0:1 S XMI=$O(XMGRP(XMI)) Q:XMI="" D
. W:'(XMJ#XMLN) ! W ?(XMJ#XMLN*XML),XMI
Q
ENUSER(XMMBR,XMABORT,XMUSER) ;
N XMX,XMDONE
W !
S XMDONE=0
F D Q:XMDONE!XMABORT
. N XMDEL
. W !,$$EZBLD^DIALOG($S($D(XMMBR):38221,1:38220)) ; Another user: / Add user:
. I $G(XMUSER)'="" D
. . S XMX=XMUSER
. . K XMUSER
. . W XMX
. E D Q:XMX=""
. . R XMX:DTIME S:'$T XMX=U I XMX[U S XMABORT=1 Q
. . I XMX="" D Q
. . . I $D(XMMBR) S XMDONE=1 Q
. . . W $C(7)," ??",!,$$EZBLD^DIALOG(38222) ; You must select a user, or enter ^ to exit.
. . I XMX?1."?" D HELPUSR(XMX) S:XMX'="?" XMX="" Q
. . I $E(XMX)="-" S XMDEL=1,XMX=$E(XMX,2,99) W:XMX="" " ??",$C(7)
. N DIC,D,X,Y,DLAYGO,XMNAME
. S X=$$UP^XLFSTR(XMX)
. S DIC("S")="I $L($P(^(0),U,3)),$D(^XMB(3.7,+Y,2))" ; User must have an access code & mailbox
. S DIC("W")="I Y'=DUZ D USERINFO^XMXADDR1(Y)"
. S DIC="^VA(200,"
. S DIC(0)="FEMN" ; 'N' means if user enters a DUZ, ask "OK?"
. S D="B^BB^C^D" ; name^alias^initial^nickname
. D MIX^DIC1 I $D(DTOUT)!$D(DUOUT) S XMABORT=1 Q
. I Y<0 W " ??",$C(7) Q
. S XMNAME=$$NAME^XMXUTIL(+Y) ; $P(Y,U,2)
. I '$G(XMDEL) S XMMBR(XMNAME)=+Y Q
. I '$D(XMMBR(XMNAME)) W !,$C(7),$$EZBLD^DIALOG(38214) Q ; ?? Not on current list.
. K XMMBR(XMNAME)
. W !,$$EZBLD^DIALOG(38215) ; Deleted from current list.
Q
HELPUSR(XMX) ;
I XMX="?" D Q
. N XMTEXT
. D BLD^DIALOG(38223,"","","XMTEXT","F")
. D MSG^DIALOG("WH","","","","XMTEXT")
. ;Enter the name of the user you wish to add to the group(s).
. ;Precede any user name with '-' to remove it.
. ;You'll only be able to select users with mailboxes and access codes.
. ;Enter ?? for a list of users you've already selected,
. ;and for user help.
I '$D(XMMBR) W !,$$EZBLD^DIALOG(38226) ;You haven't selected any users yet.
E D SHOWUSR
N DIR,X,Y,DIRUT,DTOUT,DIRUT
S DIR("A")=$$EZBLD^DIALOG(38224) ; Want user help
S DIR(0)="Y"
S DIR("B")=$$EZBLD^DIALOG(39053) ; NO
D ^DIR Q:'Y
D HELP^XMHIU
Q
SHOWUSR ;
N XMI,XMJ,XML,XMLN
W !!,$$EZBLD^DIALOG(38225) ; You've selected the following users:
S XML=0,XMI="" F S XMI=$O(XMMBR(XMI)) Q:XMI="" I $L(XMI)>XML S XML=$L(XMI)
S XML=XML+3,XMLN=80\XML
S XMI=""
F XMJ=0:1 S XMI=$O(XMMBR(XMI)) Q:XMI="" D
. W:'(XMJ#XMLN) ! W ?(XMJ#XMLN*XML),XMI
Q
ENCONF(XMGRP,XMMBR,XMABORT) ;
D SHOWGRP
D SHOWUSR
W !
N DIR,X,Y
D BLD^DIALOG(38230,"","","DIR(""A"")") ; You are adding users to mail groups. Do you wish to proceed
S DIR(0)="Y"
S DIR("B")=$$EZBLD^DIALOG(39054) ; yes
D ^DIR I 'Y S XMABORT=1
Q
ENFWD(XMDUZ,XMINSTR,XMABORT) ;
W !
N DIR,X,Y
D BLD^DIALOG(38231,"","","DIR(""A"")")
;Do you wish to forward past mail group messages
;to the user(s) you just added to the mail group(s)
D BLD^DIALOG(38232,"","","DIR(""?"")")
;Answer YES to forward past mail group messages.
;You will be asked for a time frame to search,
;and then MailMan will create a task to find and forward
;existing mail group messages.
S DIR(0)="Y"
S DIR("B")=$$EZBLD^DIALOG(39053) ; no
D ^DIR I $D(DIRUT)!'Y S XMABORT=1 Q
D FWDDATES(XMDUZ,.XMINSTR,.XMABORT) Q:XMABORT
S XMINSTR("FLAGS")="F"
Q
FWDDATES(XMDUZ,XMINSTR,XMABORT) ;
; Message sent on or before date
N DIR,Y,X,XMOLDEST,XMTEXT
;S XMOLDEST=$O(^XMB(3.9,"C",""))
F S XMOLDEST=$O(^XMB(3.9,"C","")) Q:XMOLDEST?1N.N K ^XMB(3.9,"C",XMOLDEST) ; kill bogus nodes
; You will now choose a date range for the messages to be searched
; and forwarded. The oldest message is from XMOLDEST.
W !
D BLD^DIALOG(38023.5,$$FMTE^XLFDT(XMOLDEST,5),"","XMTEXT","F")
D MSG^DIALOG("WM","",IOM,"","XMTEXT")
I $P(^XMB(3.7,XMDUZ,0),U,7) D
. N XMCUT
. S XMCUT=$P(^XMB(3.7,XMDUZ,0),U,7)
. Q:XMCUT<XMOLDEST
. ; You may not access any message prior to |1| unless someone
. ; forwards it to you.
. D BLD^DIALOG(37100,$$FMTE^XLFDT(XMCUT,5),"","XMTEXT","F")
. D MSG^DIALOG("WE","",IOM,"","XMTEXT")
. S XMOLDEST=XMCUT
W !
S DIR(0)="DO^"_XMOLDEST_":DT:EX"
S DIR("A")=$$EZBLD^DIALOG(34444) ; Message sent on or after
D BLD^DIALOG(34444.1,"","","DIR(""?"")")
; Enter a date. It must include day, month, and year.
S DIR("B")=$$FMTE^XLFDT($$MAX^XLFMTH(XMOLDEST,$$FMADD^XLFDT(DT,-365)),5)
D ^DIR I $D(DIRUT) S XMABORT=1 Q
S XMINSTR("FDATE")=Y
; Message sent on or before date
I XMINSTR("FDATE")=DT S XMINSTR("TDATE")=DT Q
K DIR,Y,X
S DIR(0)="DO^"_XMINSTR("FDATE")_":DT:EX"
S DIR("A")=$$EZBLD^DIALOG(34445) ; Message sent on or before
D BLD^DIALOG(34444.1,"","","DIR(""?"")")
; Enter a date. It must include day, month, and year.
S DIR("B")=$$FMTE^XLFDT(DT,5)
D ^DIR I $D(DIRUT) S XMABORT=1 Q
S XMINSTR("TDATE")=Y
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXMVGRP 7315 printed Oct 16, 2024@18:14:34 Page 2
XMVGRP ;ISC-SF/GMB-Group creation/enrollment ;03/07/2002 07:01
+1 ;;8.0;MailMan;;Jun 28, 2002
+2 ; Entry points used by MailMan options (not covered by DBIA):
+3 ; ENLOCAL XMxxxxx - Add local users to mail groups
ENLOCAL1(XMXQUSER) ; Add local user(s) to group(s) - called from Kernel
+1 ; XMXQUSER - first user being added (duz or name)
+2 IF '$DATA(XMV)
NEW XMV,XMDISPI,XMDUN,XMNOSEND,XMPRIV
+3 DO INITAPI^XMVVITAE
ENLOCAL ; Add local user(s) to mail group(s).
+1 NEW XMGRP,XMMBR,XMINSTR,XMTSK,XMTO,XMABORT
+2 SET XMABORT=0
+3 ; select groups
DO ENGRP(.XMGRP,.XMABORT)
if XMABORT!'$DATA(XMGRP)
QUIT
+4 ; select users
DO ENUSER(.XMMBR,.XMABORT,.XMXQUSER)
if XMABORT
QUIT
+5 ; confirm it
DO ENCONF(.XMGRP,.XMMBR,.XMABORT)
if XMABORT
QUIT
+6 ; add users to groups
DO ADD2GRPZ^XMXGRP(.XMGRP,.XMMBR,.XMTO)
+7 ; Users have been added to the mail groups
WRITE !!,$$EZBLD^DIALOG(38233)
+8 ; forward msgs?
DO ENFWD(XMDUZ,.XMINSTR,.XMABORT)
if XMABORT
QUIT
+9 ; yup.
DO FAFMSGS^XMXGRP1(XMDUZ,.XMGRP,.XMTO,.XMINSTR,.XMTSK)
+10 ; tell the user the task number.
DO FWDTSK^XMVGROUP(XMTSK)
+11 QUIT
ENGRP(XMGRP,XMABORT) ;
+1 NEW Y
+2 FOR
Begin DoDot:1
+3 NEW DIC,DIR,X,XMDEL
+4 ; Another mail group / Allocate mail group
SET DIR("A")=$$EZBLD^DIALOG($SELECT($DATA(XMGRP):38211,1:38210))
+5 SET DIR("PRE")="I $E(X)=""-"" S XMDEL=1,X=$E(X,2,99)"
+6 DO BLD^DIALOG(38213,"","","DIR(""?"")")
+7 ;Enter the name of the mail group you wish to allocate.
+8 ;Precede any mail group name with '-' to remove it.
+9 ;You'll only be able to select mail groups you're authorized to edit.
+10 ;Enter ?? for a list of mail groups you've already selected,
+11 ;and for mail group help.
+12 SET DIR("??")="^D HELPGRP^XMVGRP"
+13 SET DIR(0)="PO^3.8:FEMQ"
+14 SET DIC("S")=$$GRPSCR^XMVGROUP(1)
+15 DO ^DIR
IF $DATA(DTOUT)!$DATA(DUOUT)
SET XMABORT=1
QUIT
+16 if Y=-1
QUIT
+17 IF '$GET(XMDEL)
SET XMGRP($PIECE(Y,U,2))=+Y
QUIT
+18 ; ?? Not on current list.
IF '$DATA(XMGRP($PIECE(Y,U,2)))
WRITE $CHAR(7),$$EZBLD^DIALOG(38214)
QUIT
+19 KILL XMGRP($PIECE(Y,U,2))
+20 ; Deleted from current list.
WRITE $$EZBLD^DIALOG(38215)
End DoDot:1
if Y=-1!XMABORT
QUIT
+21 QUIT
HELPGRP ;
+1 ; You haven't selected any mail groups yet.
IF '$DATA(XMGRP)
WRITE !,$$EZBLD^DIALOG(38216)
+2 IF '$TEST
DO SHOWGRP
+3 NEW DIR,X,Y,DIRUT,DTOUT,DIRUT
+4 ; Want mail group help
SET DIR("A")=$$EZBLD^DIALOG(38217)
+5 SET DIR(0)="Y"
+6 ; NO
SET DIR("B")=$$EZBLD^DIALOG(39053)
+7 DO ^DIR
if 'Y
QUIT
+8 ;D HELP^XMHIG
+9 NEW DIC,X,Y,DLAYGO
+10 SET DIC(0)="AEQM"
SET DIC="^XMB(3.8,"
+11 SET DIC("S")=$$GRPSCR^XMVGROUP(1)
+12 FOR
WRITE !
DO ^DIC
if Y<0
QUIT
Begin DoDot:1
+13 DO DISPLAY^XMHIG(+Y)
End DoDot:1
+14 QUIT
SHOWGRP ;
+1 NEW XMI,XMJ,XML,XMLN
+2 ; You've selected the following mail groups:
WRITE !!,$$EZBLD^DIALOG(38218)
+3 SET XML=0
SET XMI=""
FOR
SET XMI=$ORDER(XMGRP(XMI))
if XMI=""
QUIT
IF $LENGTH(XMI)>XML
SET XML=$LENGTH(XMI)
+4 SET XML=XML+3
SET XMLN=80\XML
+5 SET XMI=""
+6 FOR XMJ=0:1
SET XMI=$ORDER(XMGRP(XMI))
if XMI=""
QUIT
Begin DoDot:1
+7 if '(XMJ#XMLN)
WRITE !
WRITE ?(XMJ#XMLN*XML),XMI
End DoDot:1
+8 QUIT
ENUSER(XMMBR,XMABORT,XMUSER) ;
+1 NEW XMX,XMDONE
+2 WRITE !
+3 SET XMDONE=0
+4 FOR
Begin DoDot:1
+5 NEW XMDEL
+6 ; Another user: / Add user:
WRITE !,$$EZBLD^DIALOG($SELECT($DATA(XMMBR):38221,1:38220))
+7 IF $GET(XMUSER)'=""
Begin DoDot:2
+8 SET XMX=XMUSER
+9 KILL XMUSER
+10 WRITE XMX
End DoDot:2
+11 IF '$TEST
Begin DoDot:2
+12 READ XMX:DTIME
if '$TEST
SET XMX=U
IF XMX[U
SET XMABORT=1
QUIT
+13 IF XMX=""
Begin DoDot:3
+14 IF $DATA(XMMBR)
SET XMDONE=1
QUIT
+15 ; You must select a user, or enter ^ to exit.
WRITE $CHAR(7)," ??",!,$$EZBLD^DIALOG(38222)
End DoDot:3
QUIT
+16 IF XMX?1."?"
DO HELPUSR(XMX)
if XMX'="?"
SET XMX=""
QUIT
+17 IF $EXTRACT(XMX)="-"
SET XMDEL=1
SET XMX=$EXTRACT(XMX,2,99)
if XMX=""
WRITE " ??",$CHAR(7)
End DoDot:2
if XMX=""
QUIT
+18 NEW DIC,D,X,Y,DLAYGO,XMNAME
+19 SET X=$$UP^XLFSTR(XMX)
+20 ; User must have an access code & mailbox
SET DIC("S")="I $L($P(^(0),U,3)),$D(^XMB(3.7,+Y,2))"
+21 SET DIC("W")="I Y'=DUZ D USERINFO^XMXADDR1(Y)"
+22 SET DIC="^VA(200,"
+23 ; 'N' means if user enters a DUZ, ask "OK?"
SET DIC(0)="FEMN"
+24 ; name^alias^initial^nickname
SET D="B^BB^C^D"
+25 DO MIX^DIC1
IF $DATA(DTOUT)!$DATA(DUOUT)
SET XMABORT=1
QUIT
+26 IF Y<0
WRITE " ??",$CHAR(7)
QUIT
+27 ; $P(Y,U,2)
SET XMNAME=$$NAME^XMXUTIL(+Y)
+28 IF '$GET(XMDEL)
SET XMMBR(XMNAME)=+Y
QUIT
+29 ; ?? Not on current list.
IF '$DATA(XMMBR(XMNAME))
WRITE !,$CHAR(7),$$EZBLD^DIALOG(38214)
QUIT
+30 KILL XMMBR(XMNAME)
+31 ; Deleted from current list.
WRITE !,$$EZBLD^DIALOG(38215)
End DoDot:1
if XMDONE!XMABORT
QUIT
+32 QUIT
HELPUSR(XMX) ;
+1 IF XMX="?"
Begin DoDot:1
+2 NEW XMTEXT
+3 DO BLD^DIALOG(38223,"","","XMTEXT","F")
+4 DO MSG^DIALOG("WH","","","","XMTEXT")
+5 ;Enter the name of the user you wish to add to the group(s).
+6 ;Precede any user name with '-' to remove it.
+7 ;You'll only be able to select users with mailboxes and access codes.
+8 ;Enter ?? for a list of users you've already selected,
+9 ;and for user help.
End DoDot:1
QUIT
+10 ;You haven't selected any users yet.
IF '$DATA(XMMBR)
WRITE !,$$EZBLD^DIALOG(38226)
+11 IF '$TEST
DO SHOWUSR
+12 NEW DIR,X,Y,DIRUT,DTOUT,DIRUT
+13 ; Want user help
SET DIR("A")=$$EZBLD^DIALOG(38224)
+14 SET DIR(0)="Y"
+15 ; NO
SET DIR("B")=$$EZBLD^DIALOG(39053)
+16 DO ^DIR
if 'Y
QUIT
+17 DO HELP^XMHIU
+18 QUIT
SHOWUSR ;
+1 NEW XMI,XMJ,XML,XMLN
+2 ; You've selected the following users:
WRITE !!,$$EZBLD^DIALOG(38225)
+3 SET XML=0
SET XMI=""
FOR
SET XMI=$ORDER(XMMBR(XMI))
if XMI=""
QUIT
IF $LENGTH(XMI)>XML
SET XML=$LENGTH(XMI)
+4 SET XML=XML+3
SET XMLN=80\XML
+5 SET XMI=""
+6 FOR XMJ=0:1
SET XMI=$ORDER(XMMBR(XMI))
if XMI=""
QUIT
Begin DoDot:1
+7 if '(XMJ#XMLN)
WRITE !
WRITE ?(XMJ#XMLN*XML),XMI
End DoDot:1
+8 QUIT
ENCONF(XMGRP,XMMBR,XMABORT) ;
+1 DO SHOWGRP
+2 DO SHOWUSR
+3 WRITE !
+4 NEW DIR,X,Y
+5 ; You are adding users to mail groups. Do you wish to proceed
DO BLD^DIALOG(38230,"","","DIR(""A"")")
+6 SET DIR(0)="Y"
+7 ; yes
SET DIR("B")=$$EZBLD^DIALOG(39054)
+8 DO ^DIR
IF 'Y
SET XMABORT=1
+9 QUIT
ENFWD(XMDUZ,XMINSTR,XMABORT) ;
+1 WRITE !
+2 NEW DIR,X,Y
+3 DO BLD^DIALOG(38231,"","","DIR(""A"")")
+4 ;Do you wish to forward past mail group messages
+5 ;to the user(s) you just added to the mail group(s)
+6 DO BLD^DIALOG(38232,"","","DIR(""?"")")
+7 ;Answer YES to forward past mail group messages.
+8 ;You will be asked for a time frame to search,
+9 ;and then MailMan will create a task to find and forward
+10 ;existing mail group messages.
+11 SET DIR(0)="Y"
+12 ; no
SET DIR("B")=$$EZBLD^DIALOG(39053)
+13 DO ^DIR
IF $DATA(DIRUT)!'Y
SET XMABORT=1
QUIT
+14 DO FWDDATES(XMDUZ,.XMINSTR,.XMABORT)
if XMABORT
QUIT
+15 SET XMINSTR("FLAGS")="F"
+16 QUIT
FWDDATES(XMDUZ,XMINSTR,XMABORT) ;
+1 ; Message sent on or before date
+2 NEW DIR,Y,X,XMOLDEST,XMTEXT
+3 ;S XMOLDEST=$O(^XMB(3.9,"C",""))
+4 ; kill bogus nodes
FOR
SET XMOLDEST=$ORDER(^XMB(3.9,"C",""))
if XMOLDEST?1N.N
QUIT
KILL ^XMB(3.9,"C",XMOLDEST)
+5 ; You will now choose a date range for the messages to be searched
+6 ; and forwarded. The oldest message is from XMOLDEST.
+7 WRITE !
+8 DO BLD^DIALOG(38023.5,$$FMTE^XLFDT(XMOLDEST,5),"","XMTEXT","F")
+9 DO MSG^DIALOG("WM","",IOM,"","XMTEXT")
+10 IF $PIECE(^XMB(3.7,XMDUZ,0),U,7)
Begin DoDot:1
+11 NEW XMCUT
+12 SET XMCUT=$PIECE(^XMB(3.7,XMDUZ,0),U,7)
+13 if XMCUT<XMOLDEST
QUIT
+14 ; You may not access any message prior to |1| unless someone
+15 ; forwards it to you.
+16 DO BLD^DIALOG(37100,$$FMTE^XLFDT(XMCUT,5),"","XMTEXT","F")
+17 DO MSG^DIALOG("WE","",IOM,"","XMTEXT")
+18 SET XMOLDEST=XMCUT
End DoDot:1
+19 WRITE !
+20 SET DIR(0)="DO^"_XMOLDEST_":DT:EX"
+21 ; Message sent on or after
SET DIR("A")=$$EZBLD^DIALOG(34444)
+22 DO BLD^DIALOG(34444.1,"","","DIR(""?"")")
+23 ; Enter a date. It must include day, month, and year.
+24 SET DIR("B")=$$FMTE^XLFDT($$MAX^XLFMTH(XMOLDEST,$$FMADD^XLFDT(DT,-365)),5)
+25 DO ^DIR
IF $DATA(DIRUT)
SET XMABORT=1
QUIT
+26 SET XMINSTR("FDATE")=Y
+27 ; Message sent on or before date
+28 IF XMINSTR("FDATE")=DT
SET XMINSTR("TDATE")=DT
QUIT
+29 KILL DIR,Y,X
+30 SET DIR(0)="DO^"_XMINSTR("FDATE")_":DT:EX"
+31 ; Message sent on or before
SET DIR("A")=$$EZBLD^DIALOG(34445)
+32 DO BLD^DIALOG(34444.1,"","","DIR(""?"")")
+33 ; Enter a date. It must include day, month, and year.
+34 SET DIR("B")=$$FMTE^XLFDT(DT,5)
+35 DO ^DIR
IF $DATA(DIRUT)
SET XMABORT=1
QUIT
+36 SET XMINSTR("TDATE")=Y
+37 QUIT