source: WorldVistAEHR/trunk/r/MAILMAN-XM/XMTDO.m@ 703

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

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1XMTDO ;ISC-SF/GMB-Deliver other (server,device) ;04/11/2002 07:05
2 ;;8.0;MailMan;;Jun 28, 2002
3 ; Replaces ZSER^, ZDEV^XMS1 (ISC-WASH/THM/CAP)
4SERVER ; S.server TASKMAN ENTRY
5 ; Variables supplied by TaskMan: XMZ,XMSERVER,XMSVIENS
6 ; XMSERVER Name of the server option (includes leading S.)
7 N XMZREC,XMFROM,XMSERR,XMSUBJ
8 D DUZ^XUP(.5)
9 S XMZREC=$G(^XMB(3.9,XMZ,0)) I XMZREC="" D Q
10 . N XMPARM,XMINSTR
11 . S XMINSTR("FROM")=.5
12 . S XMPARM(1)=XMSERVER
13 . S XMPARM(2)=ZTSK
14 . D TASKBULL^XMXBULL(.5,"XM SEND ERR SERVER MSG",.XMPARM,"",.5,.XMINSTR)
15 S XMSUBJ=$P(XMZREC,U,1)
16 S:XMSUBJ["~U~" XMSUB=$$DECODEUP^XMXUTIL1(XMSUBJ)
17 S XMFROM=$P(XMZREC,U,2)
18 S:XMFROM["@" XMFROM=$$REPLYTO1^XMXREPLY(XMZ)
19 D SETSTAT(XMSVIENS,$$EZBLD^DIALOG(39300)) ; Server hand off ready
20 D DOSERV($E(XMSERVER,3,99),XMZ,XMFROM,XMSUBJ,.XMSERR)
21 D SETSTAT(XMSVIENS,$S($D(XMSERR):XMSERR,1:$$EZBLD^DIALOG(39301))) ; Served (hand off done)
22 S ZTREQ="@"
23 Q
24DOSERV(XMXX,XMZ,XMFROM,XMSUBJ,XQSRVOK) ;
25 N XMCHAN,XMPROT,X,Y,XMSEN,XMREC,XMOPEN,XMCLOSE,XMSVIENS
26 S XMCHAN="SERVER"
27 D GET^XML
28 S X=XMXX_U_XMZ_U_XMFROM_U_XMSUBJ
29 D ^XQSRV
30 ; ^XQSRV1 calls SETSB^XMA1C to put the msg in the postmaster's bskt.
31 ; Instead, that line could read:
32 ; D:XQSRV PUTSERV^XMXMSGS1(XQSOP,XQMSG)
33 Q
34DEVICE ; D.device or H.device TASKMAN ENTRY
35 ; Variables supplied by TaskMan: XMDUZ,XMZ,XMDVIENS,XMPRTHDR
36 ; TaskMan opens and closes the device.
37 N XMV
38 I '$G(DUZ) D DUZ^XUP(XMDUZ)
39 D INITAPI^XMVVITAE
40 D PRTMSG^XMJMP(XMDUZ,"?",XMZ,"0-",0,$G(XMPRTHDR,1))
41 D SETSTAT(XMDVIENS,$$EZBLD^DIALOG(39302)) ; Printed
42 S ZTREQ="@"
43 Q
44SETSTAT(XMIENS,XMSTATUS) ; Record Time/Status in msg file
45 N XMFDA
46 S XMFDA(3.91,XMIENS,2)=$$NOW^XLFDT
47 S XMFDA(3.91,XMIENS,5)=XMSTATUS
48 D FILE^DIE("","XMFDA")
49 Q
Note: See TracBrowser for help on using the repository browser.