50 lines
1.7 KiB
Mathematica
50 lines
1.7 KiB
Mathematica
XMTDO ;ISC-SF/GMB-Deliver other (server,device) ;04/11/2002 07:05
|
|
;;8.0;MailMan;;Jun 28, 2002
|
|
; Replaces ZSER^, ZDEV^XMS1 (ISC-WASH/THM/CAP)
|
|
SERVER ; S.server TASKMAN ENTRY
|
|
; Variables supplied by TaskMan: XMZ,XMSERVER,XMSVIENS
|
|
; XMSERVER Name of the server option (includes leading S.)
|
|
N XMZREC,XMFROM,XMSERR,XMSUBJ
|
|
D DUZ^XUP(.5)
|
|
S XMZREC=$G(^XMB(3.9,XMZ,0)) I XMZREC="" D Q
|
|
. N XMPARM,XMINSTR
|
|
. S XMINSTR("FROM")=.5
|
|
. S XMPARM(1)=XMSERVER
|
|
. S XMPARM(2)=ZTSK
|
|
. D TASKBULL^XMXBULL(.5,"XM SEND ERR SERVER MSG",.XMPARM,"",.5,.XMINSTR)
|
|
S XMSUBJ=$P(XMZREC,U,1)
|
|
S:XMSUBJ["~U~" XMSUB=$$DECODEUP^XMXUTIL1(XMSUBJ)
|
|
S XMFROM=$P(XMZREC,U,2)
|
|
S:XMFROM["@" XMFROM=$$REPLYTO1^XMXREPLY(XMZ)
|
|
D SETSTAT(XMSVIENS,$$EZBLD^DIALOG(39300)) ; Server hand off ready
|
|
D DOSERV($E(XMSERVER,3,99),XMZ,XMFROM,XMSUBJ,.XMSERR)
|
|
D SETSTAT(XMSVIENS,$S($D(XMSERR):XMSERR,1:$$EZBLD^DIALOG(39301))) ; Served (hand off done)
|
|
S ZTREQ="@"
|
|
Q
|
|
DOSERV(XMXX,XMZ,XMFROM,XMSUBJ,XQSRVOK) ;
|
|
N XMCHAN,XMPROT,X,Y,XMSEN,XMREC,XMOPEN,XMCLOSE,XMSVIENS
|
|
S XMCHAN="SERVER"
|
|
D GET^XML
|
|
S X=XMXX_U_XMZ_U_XMFROM_U_XMSUBJ
|
|
D ^XQSRV
|
|
; ^XQSRV1 calls SETSB^XMA1C to put the msg in the postmaster's bskt.
|
|
; Instead, that line could read:
|
|
; D:XQSRV PUTSERV^XMXMSGS1(XQSOP,XQMSG)
|
|
Q
|
|
DEVICE ; D.device or H.device TASKMAN ENTRY
|
|
; Variables supplied by TaskMan: XMDUZ,XMZ,XMDVIENS,XMPRTHDR
|
|
; TaskMan opens and closes the device.
|
|
N XMV
|
|
I '$G(DUZ) D DUZ^XUP(XMDUZ)
|
|
D INITAPI^XMVVITAE
|
|
D PRTMSG^XMJMP(XMDUZ,"?",XMZ,"0-",0,$G(XMPRTHDR,1))
|
|
D SETSTAT(XMDVIENS,$$EZBLD^DIALOG(39302)) ; Printed
|
|
S ZTREQ="@"
|
|
Q
|
|
SETSTAT(XMIENS,XMSTATUS) ; Record Time/Status in msg file
|
|
N XMFDA
|
|
S XMFDA(3.91,XMIENS,2)=$$NOW^XLFDT
|
|
S XMFDA(3.91,XMIENS,5)=XMSTATUS
|
|
D FILE^DIE("","XMFDA")
|
|
Q
|