ACDPSRV1 ;IHS/ADC/EDE/KML - READ SERVER MESSAGE BACK INTO GLOBAL;
;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
;****************************************************************
;This routine is called by the server option and will take ^ACDPTMP
;out of the mail message and re-create it on the area or hq machine.
;ACDHEAD(3)=$P(^AUTTLOC($P(^AUTTSITE(1,0),U),0),U,10) and is
;used when ordering through ^ACDPTMP and allows all the servers to
;run at the same time, with each only ordering through its own data.
;*************************************************************
;
EN ;EP
;//[ACD SERVER1]
K ACDQUIT
X XMREC Q:XMER'=0 S ACDHEAD(4)=$P(XMRG,U,1,2),ACDHEAD(2)=$P(XMRG,U,3),ACDHEAD(3)=$P(XMRG,U,4) I $P(XMRG,U,5)'="$P($G(ACDZIP),U)" S ACDGOOSE=1 D XMD Q
F Q:$D(ACDQUIT) D
.X XMREC S:XMER'=0 ACDQUIT=1 Q:$D(ACDQUIT) S ACDGLO=XMRG
.X XMREC S:XMER'=0 ACDQUIT=1 Q:$D(ACDQUIT) S @ACDGLO=XMRG
;
;Build data files now that ^ACDPTMP has been imported
D ^ACDPSRV2,XMD,K Q
;
XMD ;Audit trail
S ACDFNA="SERVER (MESSAGE "_$S($D(XMZ):XMZ,1:"NF")_")"
D EN^ACDPXMD(ACDFNA,.ACDHEAD)
K ;
S XMSER="S.ACD SERVER1"
D REMSBMSG^XMA1C
K ACDHEAD,ACDGOOSE,ACDGLO,ACDFNA ; 3/31/95 EDE
Q
ACDPSRV1 ;IHS/ADC/EDE/KML - READ SERVER MESSAGE BACK INTO GLOBAL;
+1 ;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
+2 ;****************************************************************
+3 ;This routine is called by the server option and will take ^ACDPTMP
+4 ;out of the mail message and re-create it on the area or hq machine.
+5 ;ACDHEAD(3)=$P(^AUTTLOC($P(^AUTTSITE(1,0),U),0),U,10) and is
+6 ;used when ordering through ^ACDPTMP and allows all the servers to
+7 ;run at the same time, with each only ordering through its own data.
+8 ;*************************************************************
+9 ;
EN ;EP
+1 ;//[ACD SERVER1]
+2 KILL ACDQUIT
+3 XECUTE XMREC
IF XMER'=0
QUIT
SET ACDHEAD(4)=$PIECE(XMRG,U,1,2)
SET ACDHEAD(2)=$PIECE(XMRG,U,3)
SET ACDHEAD(3)=$PIECE(XMRG,U,4)
IF $PIECE(XMRG,U,5)'="$P($G(ACDZIP),U)"
SET ACDGOOSE=1
DO XMD
QUIT
+4 FOR
IF $DATA(ACDQUIT)
QUIT
Begin DoDot:1
+5 XECUTE XMREC
IF XMER'=0
SET ACDQUIT=1
IF $DATA(ACDQUIT)
QUIT
SET ACDGLO=XMRG
+6 XECUTE XMREC
IF XMER'=0
SET ACDQUIT=1
IF $DATA(ACDQUIT)
QUIT
SET @ACDGLO=XMRG
End DoDot:1
+7 ;
+8 ;Build data files now that ^ACDPTMP has been imported
+9 DO ^ACDPSRV2
DO XMD
DO K
QUIT
+10 ;
XMD ;Audit trail
+1 SET ACDFNA="SERVER (MESSAGE "_$SELECT($DATA(XMZ):XMZ,1:"NF")_")"
+2 DO EN^ACDPXMD(ACDFNA,.ACDHEAD)
K ;
+1 SET XMSER="S.ACD SERVER1"
+2 DO REMSBMSG^XMA1C
+3 ; 3/31/95 EDE
KILL ACDHEAD,ACDGOOSE,ACDGLO,ACDFNA
+4 QUIT