XMJMF1 ;ISC-SF/GMB-XMJMF (cont.) ;07/12/2002 11:08
;;8.0;MailMan;;Jun 28, 2002
FIND(XMDUZ,XMK,XMKCHOOS,XMKN) ; Search mailbox or message file
; XMK !=Search the message file
; *=Search the user's mailbox
; n=Search user's basket number n
; XMKCHOOS 1=user may choose which basket
; 0=user is locked into current basket
; U=user is doing a Postmaster Super Search
N XMDIR,XMOPT,XMOX,XMY,XMF,XMABORT,XMFFRN,XMFBSKTN,XMFTDTX,XMFFDTX,XMFRFRN,XMSRCHED,XMHDR
S (XMABORT,XMSRCHED)=0
I XMK="!" D Q:XMABORT
. I $G(XMKCHOOS)="U" D Q:XMABORT
. . I '$$SSPRIV^XMXSEC1 D Q
. . . D SHOW^XMJERR
. . . D WAIT^XMXUTIL
. . . S XMABORT=1
. . S XMF("FLAGS")="U"
. . S XMHDR=$$EZBLD^DIALOG(34435.5) ; Current 'All Messages Super Search' search criteria:
. E S XMHDR=$$EZBLD^DIALOG(34435) ; Current 'All Messages' search criteria:
. S XMF("FDATE")=$$FMADD^XLFDT(DT,-30) ; Search period is last 30 days.
. S XMF("TDATE")=DT
. S XMFFDTX=$$MMDT^XMXUTIL1(XMF("FDATE"))
. S XMFTDTX=$$MMDT^XMXUTIL1(XMF("TDATE"))
E D
. S XMHDR=$$EZBLD^DIALOG(34436) ; Current 'Mailbox' search criteria:
. S XMF("BSKT")=XMK
. I XMK S XMFBSKTN=$G(XMKN,$$BSKTNAME^XMXUTIL(XMDUZ,XMK))
F D Q:XMABORT
. W @IOF,XMHDR
. S XMDIR("A")=$$EZBLD^DIALOG(34420) ; Select search action
. I XMK'="!" D
. . I +XMF("BSKT")=XMF("BSKT") D
. . . W !,$$EZBLD^DIALOG(34437),":",?30,XMFBSKTN ; Search basket
. . . Q:'XMKCHOOS
. . . D SET^XMXSEC1("B",34421.1,.XMOPT,.XMOX) ; Change Search basket
. . . D SET^XMXSEC1("BA",34421.2,.XMOPT,.XMOX) ; Search all baskets
. . E D
. . . W !,$$EZBLD^DIALOG(34437),":",?30,$$EZBLD^DIALOG(34437.1) ; Search basket / All baskets
. . . D SET^XMXSEC1("B",34421,.XMOPT,.XMOX) ; Search one basket
. I $D(XMF("SUBJ")) D
. . W !,$$EZBLD^DIALOG(34438),":",?30,XMF("SUBJ") ; Subject contains
. . D SET^XMXSEC1("S",34422.1,.XMOPT,.XMOX) ; Change 'Subject contains' string
. E D SET^XMXSEC1("S",34422,.XMOPT,.XMOX) ; Enter 'Subject contains' string
. I $D(XMF("FROM")) D
. . W !,$$EZBLD^DIALOG(34440),":",?30,XMFFRN ; Message from
. . D SET^XMXSEC1("F",34423.1,.XMOPT,.XMOX) ; Change 'Message from' person
. E D SET^XMXSEC1("F",34423,.XMOPT,.XMOX) ; Enter 'Message from' person
. I $D(XMF("TO")) D
. . W !,$$EZBLD^DIALOG(34440.2),":",?30,XMF("TO") ; Message to
. . D SET^XMXSEC1("T",34424.1,.XMOPT,.XMOX) ; Change 'Message to' addressee
. E D SET^XMXSEC1("T",34424,.XMOPT,.XMOX) ; Enter 'Message to' addressee
. I $D(XMF("FDATE")) D
. . W !,$$EZBLD^DIALOG(34444),":",?30,XMFFDTX ; Message sent on or after
. . D SET^XMXSEC1("DA",34426.1,.XMOPT,.XMOX) ; Change 'Message sent on or after' date
. E D SET^XMXSEC1("DA",34426,.XMOPT,.XMOX) ; Enter 'Message sent on or after' date
. I $D(XMF("TDATE")) D
. . W !,$$EZBLD^DIALOG(34445),":",?30,XMFTDTX ; Message sent on or before
. . D SET^XMXSEC1("DB",34427.1,.XMOPT,.XMOX) ; Change 'Message sent on or before' date
. E D SET^XMXSEC1("DB",34427,.XMOPT,.XMOX) ; Enter 'Message sent on or before' date
. I $D(XMF("FLINE")) D
. . W !,$$EZBLD^DIALOG(34449),":",?30,XMF("FLINE") ; Lines of text, minimum
. . D SET^XMXSEC1("LM",34430.1,.XMOPT,.XMOX) ; Change 'Minimum Lines of text' number
. E D SET^XMXSEC1("LM",34430,.XMOPT,.XMOX) ; Enter 'Minimum Lines of text' number
. ;I $D(XMF("TLINE")) D
. ;. W !,$$EZBLD^DIALOG(34450),":",?30,XMF("TLINE") ; Lines of text, maximum
. ;. D SET^XMXSEC1("LX",34431.1,.XMOPT,.XMOX) ; Change 'Maximum Lines of text' number
. ;E D SET^XMXSEC1("LX",34431,.XMOPT,.XMOX) ; Enter 'Maximum Lines of text' number
. I $D(XMF("RFROM")) D
. . W !,$$EZBLD^DIALOG(34440.1),":",?30,XMFRFRN ; Response from
. . D SET^XMXSEC1("R",34428.1,.XMOPT,.XMOX) ; Change 'Response from' person
. E D SET^XMXSEC1("R",34428,.XMOPT,.XMOX) ; Enter 'Response from' person
. I $D(XMF("TEXT")) D
. . ; x.1:Message / x.2:Message or Response / x.3:Response contains
. . W !,$$EZBLD^DIALOG(34446+(XMF("TEXT","L")/10)),":",?30,XMF("TEXT")
. . D SET^XMXSEC1("X",34429.1,.XMOPT,.XMOX) ; Change 'Message contains' string
. E D SET^XMXSEC1("X",34429,.XMOPT,.XMOX) ; Enter 'Message contains' string
. D SET^XMXSEC1("Q",34420.1,.XMOPT,.XMOX) ; Quit
. I $D(XMF("SUBJ"))!$D(XMF("FROM"))!$D(XMF("FDATE"))!$D(XMF("TDATE"))!$D(XMF("TO"))!$D(XMF("RFROM"))!$D(XMF("TEXT"))!$D(XMF("FLINE"))!$D(XMF("TLINE")) D
. . D SET^XMXSEC1("G",34420.2,.XMOPT,.XMOX) ; Go search
. . S XMDIR("B")=$S(XMSRCHED:34420.1,1:34420.2) ; Q:Quit / G:Go search
. E D
. . S XMDIR("B")=34422 ; S:Enter 'Subject contains' string
. S XMDIR("??")="XM-U-Q-SEARCH CRITERIA"
. S XMDIR(0)="SC" ; show choices/split into columns, if necessary
. D XMDIR^XMJDIR(.XMDIR,.XMOPT,.XMOX,.XMY,.XMABORT) Q:XMABORT
. S XMSRCHED=(XMY="G")
. K XMOPT,XMOX,XMDIR
. D @XMY^XMJMF2
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXMJMF1 4855 printed Nov 22, 2024@17:22:03 Page 2
XMJMF1 ;ISC-SF/GMB-XMJMF (cont.) ;07/12/2002 11:08
+1 ;;8.0;MailMan;;Jun 28, 2002
FIND(XMDUZ,XMK,XMKCHOOS,XMKN) ; Search mailbox or message file
+1 ; XMK !=Search the message file
+2 ; *=Search the user's mailbox
+3 ; n=Search user's basket number n
+4 ; XMKCHOOS 1=user may choose which basket
+5 ; 0=user is locked into current basket
+6 ; U=user is doing a Postmaster Super Search
+7 NEW XMDIR,XMOPT,XMOX,XMY,XMF,XMABORT,XMFFRN,XMFBSKTN,XMFTDTX,XMFFDTX,XMFRFRN,XMSRCHED,XMHDR
+8 SET (XMABORT,XMSRCHED)=0
+9 IF XMK="!"
Begin DoDot:1
+10 IF $GET(XMKCHOOS)="U"
Begin DoDot:2
+11 IF '$$SSPRIV^XMXSEC1
Begin DoDot:3
+12 DO SHOW^XMJERR
+13 DO WAIT^XMXUTIL
+14 SET XMABORT=1
End DoDot:3
QUIT
+15 SET XMF("FLAGS")="U"
+16 ; Current 'All Messages Super Search' search criteria:
SET XMHDR=$$EZBLD^DIALOG(34435.5)
End DoDot:2
if XMABORT
QUIT
+17 ; Current 'All Messages' search criteria:
IF '$TEST
SET XMHDR=$$EZBLD^DIALOG(34435)
+18 ; Search period is last 30 days.
SET XMF("FDATE")=$$FMADD^XLFDT(DT,-30)
+19 SET XMF("TDATE")=DT
+20 SET XMFFDTX=$$MMDT^XMXUTIL1(XMF("FDATE"))
+21 SET XMFTDTX=$$MMDT^XMXUTIL1(XMF("TDATE"))
End DoDot:1
if XMABORT
QUIT
+22 IF '$TEST
Begin DoDot:1
+23 ; Current 'Mailbox' search criteria:
SET XMHDR=$$EZBLD^DIALOG(34436)
+24 SET XMF("BSKT")=XMK
+25 IF XMK
SET XMFBSKTN=$GET(XMKN,$$BSKTNAME^XMXUTIL(XMDUZ,XMK))
End DoDot:1
+26 FOR
Begin DoDot:1
+27 WRITE @IOF,XMHDR
+28 ; Select search action
SET XMDIR("A")=$$EZBLD^DIALOG(34420)
+29 IF XMK'="!"
Begin DoDot:2
+30 IF +XMF("BSKT")=XMF("BSKT")
Begin DoDot:3
+31 ; Search basket
WRITE !,$$EZBLD^DIALOG(34437),":",?30,XMFBSKTN
+32 if 'XMKCHOOS
QUIT
+33 ; Change Search basket
DO SET^XMXSEC1("B",34421.1,.XMOPT,.XMOX)
+34 ; Search all baskets
DO SET^XMXSEC1("BA",34421.2,.XMOPT,.XMOX)
End DoDot:3
+35 IF '$TEST
Begin DoDot:3
+36 ; Search basket / All baskets
WRITE !,$$EZBLD^DIALOG(34437),":",?30,$$EZBLD^DIALOG(34437.1)
+37 ; Search one basket
DO SET^XMXSEC1("B",34421,.XMOPT,.XMOX)
End DoDot:3
End DoDot:2
+38 IF $DATA(XMF("SUBJ"))
Begin DoDot:2
+39 ; Subject contains
WRITE !,$$EZBLD^DIALOG(34438),":",?30,XMF("SUBJ")
+40 ; Change 'Subject contains' string
DO SET^XMXSEC1("S",34422.1,.XMOPT,.XMOX)
End DoDot:2
+41 ; Enter 'Subject contains' string
IF '$TEST
DO SET^XMXSEC1("S",34422,.XMOPT,.XMOX)
+42 IF $DATA(XMF("FROM"))
Begin DoDot:2
+43 ; Message from
WRITE !,$$EZBLD^DIALOG(34440),":",?30,XMFFRN
+44 ; Change 'Message from' person
DO SET^XMXSEC1("F",34423.1,.XMOPT,.XMOX)
End DoDot:2
+45 ; Enter 'Message from' person
IF '$TEST
DO SET^XMXSEC1("F",34423,.XMOPT,.XMOX)
+46 IF $DATA(XMF("TO"))
Begin DoDot:2
+47 ; Message to
WRITE !,$$EZBLD^DIALOG(34440.2),":",?30,XMF("TO")
+48 ; Change 'Message to' addressee
DO SET^XMXSEC1("T",34424.1,.XMOPT,.XMOX)
End DoDot:2
+49 ; Enter 'Message to' addressee
IF '$TEST
DO SET^XMXSEC1("T",34424,.XMOPT,.XMOX)
+50 IF $DATA(XMF("FDATE"))
Begin DoDot:2
+51 ; Message sent on or after
WRITE !,$$EZBLD^DIALOG(34444),":",?30,XMFFDTX
+52 ; Change 'Message sent on or after' date
DO SET^XMXSEC1("DA",34426.1,.XMOPT,.XMOX)
End DoDot:2
+53 ; Enter 'Message sent on or after' date
IF '$TEST
DO SET^XMXSEC1("DA",34426,.XMOPT,.XMOX)
+54 IF $DATA(XMF("TDATE"))
Begin DoDot:2
+55 ; Message sent on or before
WRITE !,$$EZBLD^DIALOG(34445),":",?30,XMFTDTX
+56 ; Change 'Message sent on or before' date
DO SET^XMXSEC1("DB",34427.1,.XMOPT,.XMOX)
End DoDot:2
+57 ; Enter 'Message sent on or before' date
IF '$TEST
DO SET^XMXSEC1("DB",34427,.XMOPT,.XMOX)
+58 IF $DATA(XMF("FLINE"))
Begin DoDot:2
+59 ; Lines of text, minimum
WRITE !,$$EZBLD^DIALOG(34449),":",?30,XMF("FLINE")
+60 ; Change 'Minimum Lines of text' number
DO SET^XMXSEC1("LM",34430.1,.XMOPT,.XMOX)
End DoDot:2
+61 ; Enter 'Minimum Lines of text' number
IF '$TEST
DO SET^XMXSEC1("LM",34430,.XMOPT,.XMOX)
+62 ;I $D(XMF("TLINE")) D
+63 ;. W !,$$EZBLD^DIALOG(34450),":",?30,XMF("TLINE") ; Lines of text, maximum
+64 ;. D SET^XMXSEC1("LX",34431.1,.XMOPT,.XMOX) ; Change 'Maximum Lines of text' number
+65 ;E D SET^XMXSEC1("LX",34431,.XMOPT,.XMOX) ; Enter 'Maximum Lines of text' number
+66 IF $DATA(XMF("RFROM"))
Begin DoDot:2
+67 ; Response from
WRITE !,$$EZBLD^DIALOG(34440.1),":",?30,XMFRFRN
+68 ; Change 'Response from' person
DO SET^XMXSEC1("R",34428.1,.XMOPT,.XMOX)
End DoDot:2
+69 ; Enter 'Response from' person
IF '$TEST
DO SET^XMXSEC1("R",34428,.XMOPT,.XMOX)
+70 IF $DATA(XMF("TEXT"))
Begin DoDot:2
+71 ; x.1:Message / x.2:Message or Response / x.3:Response contains
+72 WRITE !,$$EZBLD^DIALOG(34446+(XMF("TEXT","L")/10)),":",?30,XMF("TEXT")
+73 ; Change 'Message contains' string
DO SET^XMXSEC1("X",34429.1,.XMOPT,.XMOX)
End DoDot:2
+74 ; Enter 'Message contains' string
IF '$TEST
DO SET^XMXSEC1("X",34429,.XMOPT,.XMOX)
+75 ; Quit
DO SET^XMXSEC1("Q",34420.1,.XMOPT,.XMOX)
+76 IF $DATA(XMF("SUBJ"))!$DATA(XMF("FROM"))!$DATA(XMF("FDATE"))!$DATA(XMF("TDATE"))!$DATA(XMF("TO"))!$DATA(XMF("RFROM"))!$DATA(XMF("TEXT"))!$DATA(XMF("FLINE"))!$DATA(XMF("TLINE"))
Begin DoDot:2
+77 ; Go search
DO SET^XMXSEC1("G",34420.2,.XMOPT,.XMOX)
+78 ; Q:Quit / G:Go search
SET XMDIR("B")=$SELECT(XMSRCHED:34420.1,1:34420.2)
End DoDot:2
+79 IF '$TEST
Begin DoDot:2
+80 ; S:Enter 'Subject contains' string
SET XMDIR("B")=34422
End DoDot:2
+81 SET XMDIR("??")="XM-U-Q-SEARCH CRITERIA"
+82 ; show choices/split into columns, if necessary
SET XMDIR(0)="SC"
+83 DO XMDIR^XMJDIR(.XMDIR,.XMOPT,.XMOX,.XMY,.XMABORT)
if XMABORT
QUIT
+84 SET XMSRCHED=(XMY="G")
+85 KILL XMOPT,XMOX,XMDIR
+86 DO @XMY^XMJMF2
End DoDot:1
if XMABORT
QUIT
+87 QUIT