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

XMJBL.m

Go to the documentation of this file.
  1. XMJBL ;ISC-SF/GMB-List contents of user's Mailbox ;12/04/2002 13:46
  1. ;;8.0;MailMan;**10**;Jun 28, 2002
  1. ; Entry points used by MailMan options (not covered by DBIA):
  1. ; LISTMBOX XMBASKLIST - List all messages in user's mailbox
  1. MBOX ; List messages in mailbox of DUZ
  1. N DIC,Y
  1. S DIC(0)="AEQZ",DIC=3.7
  1. D ^DIC Q:Y=-1
  1. D LISTM(+Y,$P(Y(0,0),U))
  1. Q
  1. LISTMBOX ; Option to list mailbox contents comes in here
  1. N ZTSAVE,XMNAME,DIR,X,Y,XMALL
  1. D CHECK^XMVVITAE
  1. S DIR("A")=$$EZBLD^DIALOG(34650) ; List contents of
  1. S XMALL=$$EZBLD^DIALOG(34651) ; A:All Baskets
  1. S DIR(0)="S^"_XMALL_";"_$$EZBLD^DIALOG(34652) ; O:One Basket
  1. S DIR("B")=$P(XMALL,":",2) ; All Baskets
  1. D ^DIR Q:$D(DIRUT)
  1. S XMNAME=XMV("NAME")
  1. S (ZTSAVE("XMDUZ"),ZTSAVE("XMNAME"),ZTSAVE("XMV(""ORDER"")"))=""
  1. I Y=$P(XMALL,":",1) D EN^XUTMDEVQ("ZLISTM^XMJBL",$$EZBLD^DIALOG(34654),.ZTSAVE) Q ; MailMan: Mailbox Contents List
  1. N XMK,XMKN
  1. D SELBSKT^XMJBU(XMDUZ,34653,"","",.XMK,.XMKN) Q:XMK=U ; List contents of MAIL BASKET:
  1. S (ZTSAVE("XMK"),ZTSAVE("XMKN"))=""
  1. D EN^XUTMDEVQ("ZLISTB^XMJBL",$$EZBLD^DIALOG(34655),.ZTSAVE) ; MailMan: Basket Contents List
  1. Q
  1. LISTM(XMDUZ,XMNAME) ; List Mailbox
  1. ZLISTM ;
  1. N XMPAGE,XMLEN,XMK,XMKN,XMABORT
  1. S XMKN=""
  1. S XMLEN("XMKZ")=6
  1. D INIT(.XMNAME,.XMLEN,.XMPAGE,.XMABORT)
  1. F S XMKN=$O(^XMB(3.7,XMDUZ,2,"B",XMKN)) Q:XMKN="" D Q:XMABORT
  1. . S XMK=$O(^(XMKN,"")) ; Naked reference to above line
  1. . D LB(XMDUZ,XMNAME,XMK,XMKN,.XMLEN,.XMPAGE,.XMABORT)
  1. Q:$E($G(IOST),1,2)'="C-"!XMABORT
  1. D WAIT^XMXUTIL
  1. Q
  1. LISTB(XMDUZ,XMNAME,XMK,XMKN) ; List Basket
  1. ZLISTB ;
  1. N XMPAGE,XMLEN,XMABORT
  1. S XMLEN("XMKZ")=$L($O(^XMB(3.7,XMDUZ,2,XMK,1,"C",""),-1))
  1. D INIT(.XMNAME,.XMLEN,.XMPAGE,.XMABORT)
  1. D LB(XMDUZ,XMNAME,XMK,XMKN,.XMLEN,.XMPAGE,.XMABORT)
  1. Q:$E($G(IOST),1,2)'="C-"!XMABORT
  1. D WAIT^XMXUTIL
  1. Q
  1. LB(XMDUZ,XMNAME,XMK,XMKN,XMLEN,XMPAGE,XMABORT) ;
  1. N XMKZ,XMZ,XMZREC
  1. I $Y+5>IOSL D PAGE Q:XMABORT
  1. W !!,$$EZBLD^DIALOG(34656,XMKN) ; Basket: |1|
  1. S XMKZ=""
  1. F S XMKZ=$O(^XMB(3.7,XMDUZ,2,XMK,1,"C",XMKZ),XMV("ORDER")) Q:XMKZ'>0 D Q:XMABORT
  1. . S XMZ=$O(^(XMKZ,"")) ; Naked reference to line above
  1. . S XMZREC=$G(^XMB(3.9,XMZ,0))
  1. . I XMZREC="" D ZAPIT^XMXMSGS2(XMDUZ,XMK,XMZ) Q
  1. . I $Y+3>IOSL D Q:XMABORT
  1. . . D PAGE Q:XMABORT
  1. . . W !!,$$EZBLD^DIALOG(34656.1,XMKN) ; Basket: |1| (continued)
  1. . W !,$J(XMKZ,XMLEN("XMKZ")),". ",$J("["_XMZ_"]",XMLEN("XMZ"))," ",$$DATE^XMXUTIL2(XMZREC,1)," ",$E($$SUBJ^XMXUTIL2(XMZREC),1,XMLEN("SUBJ"))
  1. Q
  1. INIT(XMNAME,XMLEN,XMPAGE,XMABORT) ;
  1. I $D(ZTQUEUED) S ZTREQ="@"
  1. S (XMPAGE,XMABORT)=0
  1. S XMLEN("XMZ")=$L($O(^XMB(3.9,":"),-1))+2
  1. S XMLEN("DATE")=$L($$MMDT^XMXUTIL1($$NOW^XLFDT))
  1. S XMLEN("SUBJ")=79-XMLEN("DATE")-XMLEN("XMKZ")-XMLEN("XMZ")-5
  1. S XMNAME=XMNAME_" - "_$$MMDT^XMXUTIL1($$NOW^XLFDT)
  1. W:$E($G(IOST),1,2)="C-" @IOF
  1. D HEADER
  1. Q
  1. PAGE ;
  1. I $E($G(IOST),1,2)="C-" D PAGE^XMXUTIL(.XMABORT) Q:XMABORT
  1. W @IOF
  1. D HEADER
  1. Q
  1. N XMPARM
  1. S XMPAGE=XMPAGE+1
  1. S XMPARM(1)=XMNAME,XMPARM(2)=XMPAGE
  1. W $$EZBLD^DIALOG(34657,.XMPARM) ; Mailbox Content for |1| Page: |2|
  1. W !,$$REPEAT^XLFSTR("-",79)
  1. Q