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

XQSRV4.m

Go to the documentation of this file.
  1. XQSRV4 ;SEA/MJM - Server utilities;;2/6/92 2:13 PM ;3/10/92 07:55;11/9/93 2:58 PM [ 04/02/2003 8:29 AM ]
  1. ;;8.0;KERNEL;**1002,1003,1004,1005,1007**;APR 1, 2003
  1. ;;8.0;KERNEL;;Jul 10, 1995
  1. ;
  1. ;This routine takes a pointer to a bulletin in X and looks to
  1. ;see if there is an active user reachable through it's mail group.
  1. ;If the site has chosen a bulletin other than XQSERVER then it
  1. ;checks that one first, if it fails it defaults to XQSERVER. If
  1. ;that fails too the routine returns Y="".
  1. ;
  1. I '$D(X) S Y="" Q
  1. S U="^",Y=1,%XQGO=0
  1. 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
  1. S (X,XQMB)="XQSERVER" S %=$O(^XMB(3.6,"B","XQSERVER",0)) I %="" S Y="",XQER1=" is not in bulletin file." G KILL
  1. D GRP
  1. I %XQGO S Y=1
  1. E S Y=""
  1. ;
  1. KILL ;Clean up and depart
  1. K %XQB,%XQG,%XQGO,%XQI,%XQJ,%XQN,%XQT,%XQU,X
  1. Q
  1. ;
  1. GRP ;See if there is a legitimate mail group
  1. S %XQB=X,%XQN=$O(^XMB(3.6,"B",%XQB,0)) I %XQN="" S Y="" Q
  1. 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
  1. I %XQGO S Y=%XQU
  1. E S Y=""
  1. Q
  1. ;
  1. BULL ;Set up the bulletin parameters and/or reply mail and fire 'em off
  1. S XMB=XQMB,XMB(1)=XQDATE,XMB(2)=XMFROM,XMB(3)=XQSOP,XMB(4)=XQSUB,XMB(5)=XQMSG
  1. S:XQER[";;" XQER=$P(XQER,";;",2)
  1. S XMB(6)=XQMB6,XMB=XQMB
  1. I XMB(6)=" " S XMB(6)="No errors detected by the Menu System.",XMB(7)="OK"
  1. E S XMB(7)="ERROR"
  1. I $D(XQSTXT) S XMTEXT="XQSTXT("
  1. 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)=""
  1. I $D(XMFROM),XMFROM=+XMFROM,$D(^VA(200,XMFROM,0)) S XMFROM=$P(^(0),U)
  1. D:'XQNOUSR ^XMB K XMY
  1. Q
  1. ;
  1. USER ;See if this User is still active
  1. Q:'$D(^VA(200,%XQU,0))#2 Q:$P(^(.1),U,2)="" S %XQT=$P(^(0),U,11) I %XQT'="" Q:DT>%XQT
  1. S %XQGO=1
  1. Q