XMJMF ;ISC-SF/GMB-Find messages based on criteria ;07/10/2002 09:58
;;8.0;MailMan;;Jun 28, 2002
; Replaces ^XMA03,^XMAL0,^XMAL0A (ISC-WASH/CAP/THM)
; Entry points used by MailMan options (not covered by DBIA):
; FIND XMSEARCH
; SUPER XM SUPER SEARCH
FINDBSKT(XMDUZ,XMK,XMKN) ; Find messages in a particular basket
D FIND^XMJMF1(XMDUZ,XMK,0,XMKN)
Q
FIND ; Find messages in any basket or find any message
N XMDIR,XMOX,XMOPT,XMY,XMABORT
D CHECK^XMVVITAE
S XMABORT=0
S XMDIR("A")=$$EZBLD^DIALOG(34410) ; Select message search method:
D SET^XMXSEC1("S",34411,.XMOPT,.XMOX) ; S:Search all messages by subject only
D SET^XMXSEC1("A",34413,.XMOPT,.XMOX) ; A:Search all messages by multiple criteria
D SET^XMXSEC1("M",34412,.XMOPT,.XMOX) ; M:Search my Mailbox by multiple criteria
S XMDIR(0)="S" ; show the choices
S XMDIR("?")=34414
S XMDIR("??")="XM-U-Q-SEARCH"
D XMDIR^XMJDIR(.XMDIR,.XMOPT,.XMOX,.XMY,.XMABORT) Q:XMABORT
K XMOX,XMOPT,XMDIR
D @XMY
Q
S ; Search all existing messages by subject
N DIR,Y,DIRUT
S DIR(0)="FO^3:30"
S DIR("A")=$$EZBLD^DIALOG(34415) ; Enter the string that the subject starts with
D BLD^DIALOG(34416,"","","DIR(""?"")")
;The string may be from 3 to 30 characters.
;We will find all messages whose subject starts with the string you enter.
;We will search all existing messages which you have ever had access to,
;whether they are in your mailbox or not.
;The search is case-sensitive.
S DIR("??")="XM-U-Q-SEARCH SYSTEM"
D ^DIR Q:$D(DIRUT)
W !,$$EZBLD^DIALOG(34417) ; Searching...
D FIND^XMJMFA(XMDUZ,Y)
Q
A ; Search all existing messages by multiple criteria
D ALL(XMDUZ)
Q
ALL(XMDUZ,XMFLAG) ;
N XMTEXT
W !
; * * * * * WARNING * * * * *
I $G(XMFLAG)="U" D
. D BLD^DIALOG(34418.5,"","","XMTEXT","F")
. ;This is the Super Search which looks at all messages
. ;in the MESSAGE file which were sent by anyone and everyone during the
. ;entire time period you select, regardless of whether or not you are
. ;party to the messages. This is a very powerful search and should not
. ;be abused. You should have good reason and authorization to be here.
E D
. D BLD^DIALOG(34418,"","","XMTEXT","F")
. ;This search looks at all messages in the MESSAGE file which were sent
. ;to you or by you during the entire time period you select.
D BLD^DIALOG(34419,"","","XMTEXT","F")
;This search can take a very long time, depending on how many messages
;were sent at this site during the time period you select, and how many
;search criteria you specify. The more messages to search, the more
;search criteria you specify, the longer the search will take.
; This search can be VERY SLOW. Be forewarned!
D MSG^DIALOG("WM","",IOM,"","XMTEXT")
W !
D WAIT^XMXUTIL
D FIND^XMJMF1(XMDUZ,"!",$G(XMFLAG))
Q
M ; Search my mailbox by multiple criteria
D FIND^XMJMF1(XMDUZ,"*",1)
Q
SUPER ; Super Search all messages in the Message file
N XMDUZ,XMV
D INITAPI^XMVVITAE
I $D(XMV("ERROR")) D ERROR^XM(.XMV,"ERROR") Q
D ALL(DUZ,"U")
Q
XMJMF ;ISC-SF/GMB-Find messages based on criteria ;07/10/2002 09:58
+1 ;;8.0;MailMan;;Jun 28, 2002
+2 ; Replaces ^XMA03,^XMAL0,^XMAL0A (ISC-WASH/CAP/THM)
+3 ; Entry points used by MailMan options (not covered by DBIA):
+4 ; FIND XMSEARCH
+5 ; SUPER XM SUPER SEARCH
FINDBSKT(XMDUZ,XMK,XMKN) ; Find messages in a particular basket
+1 DO FIND^XMJMF1(XMDUZ,XMK,0,XMKN)
+2 QUIT
FIND ; Find messages in any basket or find any message
+1 NEW XMDIR,XMOX,XMOPT,XMY,XMABORT
+2 DO CHECK^XMVVITAE
+3 SET XMABORT=0
+4 ; Select message search method:
SET XMDIR("A")=$$EZBLD^DIALOG(34410)
+5 ; S:Search all messages by subject only
DO SET^XMXSEC1("S",34411,.XMOPT,.XMOX)
+6 ; A:Search all messages by multiple criteria
DO SET^XMXSEC1("A",34413,.XMOPT,.XMOX)
+7 ; M:Search my Mailbox by multiple criteria
DO SET^XMXSEC1("M",34412,.XMOPT,.XMOX)
+8 ; show the choices
SET XMDIR(0)="S"
+9 SET XMDIR("?")=34414
+10 SET XMDIR("??")="XM-U-Q-SEARCH"
+11 DO XMDIR^XMJDIR(.XMDIR,.XMOPT,.XMOX,.XMY,.XMABORT)
IF XMABORT
QUIT
+12 KILL XMOX,XMOPT,XMDIR
+13 DO @XMY
+14 QUIT
S ; Search all existing messages by subject
+1 NEW DIR,Y,DIRUT
+2 SET DIR(0)="FO^3:30"
+3 ; Enter the string that the subject starts with
SET DIR("A")=$$EZBLD^DIALOG(34415)
+4 DO BLD^DIALOG(34416,"","","DIR(""?"")")
+5 ;The string may be from 3 to 30 characters.
+6 ;We will find all messages whose subject starts with the string you enter.
+7 ;We will search all existing messages which you have ever had access to,
+8 ;whether they are in your mailbox or not.
+9 ;The search is case-sensitive.
+10 SET DIR("??")="XM-U-Q-SEARCH SYSTEM"
+11 DO ^DIR
IF $DATA(DIRUT)
QUIT
+12 ; Searching...
WRITE !,$$EZBLD^DIALOG(34417)
+13 DO FIND^XMJMFA(XMDUZ,Y)
+14 QUIT
A ; Search all existing messages by multiple criteria
+1 DO ALL(XMDUZ)
+2 QUIT
ALL(XMDUZ,XMFLAG) ;
+1 NEW XMTEXT
+2 WRITE !
+3 ; * * * * * WARNING * * * * *
+4 IF $GET(XMFLAG)="U"
Begin DoDot:1
+5 DO BLD^DIALOG(34418.5,"","","XMTEXT","F")
+6 ;This is the Super Search which looks at all messages
+7 ;in the MESSAGE file which were sent by anyone and everyone during the
+8 ;entire time period you select, regardless of whether or not you are
+9 ;party to the messages. This is a very powerful search and should not
+10 ;be abused. You should have good reason and authorization to be here.
End DoDot:1
+11 IF '$TEST
Begin DoDot:1
+12 DO BLD^DIALOG(34418,"","","XMTEXT","F")
+13 ;This search looks at all messages in the MESSAGE file which were sent
+14 ;to you or by you during the entire time period you select.
End DoDot:1
+15 DO BLD^DIALOG(34419,"","","XMTEXT","F")
+16 ;This search can take a very long time, depending on how many messages
+17 ;were sent at this site during the time period you select, and how many
+18 ;search criteria you specify. The more messages to search, the more
+19 ;search criteria you specify, the longer the search will take.
+20 ; This search can be VERY SLOW. Be forewarned!
+21 DO MSG^DIALOG("WM","",IOM,"","XMTEXT")
+22 WRITE !
+23 DO WAIT^XMXUTIL
+24 DO FIND^XMJMF1(XMDUZ,"!",$GET(XMFLAG))
+25 QUIT
M ; Search my mailbox by multiple criteria
+1 DO FIND^XMJMF1(XMDUZ,"*",1)
+2 QUIT
SUPER ; Super Search all messages in the Message file
+1 NEW XMDUZ,XMV
+2 DO INITAPI^XMVVITAE
+3 IF $DATA(XMV("ERROR"))
DO ERROR^XM(.XMV,"ERROR")
QUIT
+4 DO ALL(DUZ,"U")
+5 QUIT