Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: XMJMF

XMJMF.m

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