source: WorldVistAEHR/trunk/r/MAILMAN-XM/XMDIRQST.m@ 1009

Last change on this file since 1009 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.0 KB
Line 
1XMDIRQST ;(WASH ISC)/CWU-Request Email Directory ;04/18/2002 07:31
2 ;;8.0;MailMan;;Jun 28, 2002
3 ; Entry points used by MailMan options (not covered by DBIA):
4 ; ALL XMMGR-DIRECTORY-ALL
5 ; EDIT XMMGR-DIRECTORY-EDITGRP
6 ; GROUP XMMGR-DIRECTORY-GROUP
7 ; LISTGRP XMMGR-DIRECTORY-LISTGRP
8 ; SINGLE XMMGR-DIRECTORY-SINGLE
9 Q
10ALL N DIR,Y,A,DTOUT,DUOUT,NETADDR,XMSUB,XMY,ZTDTH,ZTSAVE
11 S DIR(0)="Y"
12 S DIR("A")="Request directories from all domains"
13 S DIR("B")="NO"
14 S DIR("?")="Enter YES to request directories from all domains."
15 D ^DIR I $D(DIRUT)!'Y Q
16 S I=0 F S I=$O(^DIC(4.2,I)) Q:I'=+I D S(I)
17 Q
18SINGLE ;Send a request to one Domain
19 W !!,"Choose Domains to request Email Directories for."
20 N DIC,X,Y
21 S DIC("A")="Select DOMAIN Name: ",DIC="^DIC(4.2,",DIC(0)="AEQZ"
22 D ^DIC Q:Y<0
23 D S(+Y)
24 Q
25S(I) ;Schedule Task to Send Request to Domain
26 N %,X,R ; I=IEN
27 ;Do not send if No Domain Information, etc.
28 S %=$G(^DIC(4.2,+I,0)) I %="" W $C(7)," ??? No entry in Domain File (4.2) for domain '",I,"'. [S(I)+2^XMDIRQST]" Q
29 S X=$P(%,U),R=$P(%,U,3) I R W $C(7)," ??? The directory request for ",X," (`",I,") is NOT permitted since it is accessed via relay domain '",$P($G(^DIC(4.2,+R,0)),U)," (`",R,"). [S(I)+3^XMDIRQST] " Q
30 I X["FOC-AUSTIN" W $C(7)," ??? The request for a directory from ",X," (`",I,") is NOT permitted as it is through FOC-AUSTIN. [S(I)+4^XMDIRQST]" Q
31 I $E(X,1,2)="Q-" W $C(7)," ??? The request for a directory from ",X," (`",I,") is NOT permitted since it is a relay domain (Q-...). [S(I)+5^XMDIRQST]" Q
32 I X=^XMB("NETNAME") W $C(7)," ??? You may not request a directory from your own site." Q
33TASK ; Set up Task
34 N XMTASK,NETADDR
35 S XMTASK=$G(ZTSK) N ZTSK
36 S NETADDR=X,ZTSAVE("NETADDR")=""
37 S ZTRTN="ONE^XMDIRQST",ZTDTH=+$H_",64800"
38 S ZTIO="",ZTDESC="Email Directory Request to - "_X
39 D ^%ZTLOAD
40 I 'XMTASK W !!,$C(7),"TASK #"_ZTSK_" scheduled for "_NETADDR
41 Q
42ONE ;
43 N XMTEXT,XMINSTR
44 S XMINSTR("FROM")=.5
45 S XMTEXT(1)="Directory request"
46 D SENDMSG^XMXSEND(.5,"Request for Email Address Directory","XMTEXT","S.XMMGR-DIRECTORY-SEND@"_NETADDR,.XMINSTR)
47 Q
48LISTGRP ;
49 N LSTBYGRP S LSTBYGRP=1
50GROUP ;
51 N DIR,Y,DTOUT,DUOUT,NETADDR,XMGROUP,XMSUB,XMY,ZTDTH,ZTSAVE,ZTSK
52 S DIC="^DIC(4.2,",DIC(0)="AQZXC"
53 K DO S D="AE",DIC("A")="Enter Directory Group Number: "
54 S DIC("S")="I $O(^DIC(4.2,""AE"",X,""""))=+Y"
55 D IX^DIC
56 Q:Y<1 S (X,XMGROUP)=+^DIC(4.2,+Y,50)
57 W !!,"Group Number ",X," contains following Domain names : "
58 S I=0 F S I=$O(^DIC(4.2,"AE",X,I)) Q:I="" W !,$P(^DIC(4.2,I,0),U)
59 W !!
60 Q:$G(LSTBYGRP)
61 S DIR(0)="Y"
62 S DIR("A")="Do you wish to schedule Directory Request(s) for group number "_XMGROUP
63 S DIR("B")="NO"
64 S DIR("?")="Enter YES if you wish to request directories from all domains in the group."
65 D ^DIR Q:$D(DIRUT)!'Y
66 S I=0 F S I=$O(^DIC(4.2,"AE",XMGROUP,I)) Q:I="" D S(I)
67 Q
68EDIT ;
69 W !!,"Enter the Domain name whose Directory Requests Flag you wish to edit."
70 K DIC S DIC="^DIC(4.2,",DIC(0)="AEQZ" D ^DIC
71 Q:$D(DTOUT)!$D(DUOUT)!(Y<1)
72 S DIE="^DIC(4.2,",DA=+Y,DR=50 D ^DIE
73 G EDIT
Note: See TracBrowser for help on using the repository browser.