source: FOIAVistA/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQSRV4.m@ 1635

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

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1XQSRV4 ;SEA/MJM - Server utilities;;2/6/92 2:13 PM ;3/10/92 07:55;11/9/93 2:58 PM
2 ;;8.0;KERNEL;;Jul 10, 1995
3 ;
4 ;This routine takes a pointer to a bulletin in X and looks to
5 ;see if there is an active user reachable through it's mail group.
6 ;If the site has chosen a bulletin other than XQSERVER then it
7 ;checks that one first, if it fails it defaults to XQSERVER. If
8 ;that fails too the routine returns Y="".
9 ;
10 I '$D(X) S Y="" Q
11 S U="^",Y=1,%XQGO=0
12 I X]"" S X=$P($G(^XMB(3.6,+X,0)),U) I X]"" D GRP I %XQGO S XQMB=%XQB,Y=1 G KILL
13 S (X,XQMB)="XQSERVER" S %=$O(^XMB(3.6,"B","XQSERVER",0)) I %="" S Y="",XQER1=" is not in bulletin file." G KILL
14 D GRP
15 I %XQGO S Y=1
16 E S Y=""
17 ;
18KILL ;Clean up and depart
19 K %XQB,%XQG,%XQGO,%XQI,%XQJ,%XQN,%XQT,%XQU,X
20 Q
21 ;
22GRP ;See if there is a legitimate mail group
23 S %XQB=X,%XQN=$O(^XMB(3.6,"B",%XQB,0)) I %XQN="" S Y="" Q
24 F %XQI=0:0 Q:%XQGO S %XQI=$O(^XMB(3.6,%XQN,2,"B",%XQI)) Q:%XQI="" I $D(^XMB(3.8,%XQI,0))#2 S %XQU="" F %XQJ=0:0 S %XQU=$O(^XMB(3.8,%XQI,1,"B",%XQU)) Q:%XQU="" D USER Q:%XQGO
25 I %XQGO S Y=%XQU
26 E S Y=""
27 Q
28 ;
29BULL ;Set up the bulletin parameters and/or reply mail and fire 'em off
30 S XMB=XQMB,XMB(1)=XQDATE,XMB(2)=XMFROM,XMB(3)=XQSOP,XMB(4)=XQSUB,XMB(5)=XQMSG
31 S:XQER[";;" XQER=$P(XQER,";;",2)
32 S XMB(6)=XQMB6,XMB=XQMB
33 I XMB(6)=" " S XMB(6)="No errors detected by the Menu System.",XMB(7)="OK"
34 E S XMB(7)="ERROR"
35 I $D(XQSTXT) S XMTEXT="XQSTXT("
36 S XQJ=$P(XQ220,U,3) I $L(XQJ),$D(^XMB(3.8,XQJ,0)) S XQN="" F XQI=0:0 S XQN=$O(^XMB(3.8,XQJ,1,"B",XQN)) Q:XQN="" S XMY(XQN)=""
37 I $D(XMFROM),XMFROM=+XMFROM,$D(^VA(200,XMFROM,0)) S XMFROM=$P(^(0),U)
38 D:'XQNOUSR ^XMB K XMY
39 Q
40 ;
41USER ;See if this User is still active
42 Q:'$D(^VA(200,%XQU,0))#2 Q:$P(^(.1),U,2)="" S %XQT=$P(^(0),U,11) I %XQT'="" Q:DT>%XQT
43 S %XQGO=1
44 Q
Note: See TracBrowser for help on using the repository browser.