XMRTCPGO ;(WASH ISC)/THM/CAP-Start XMRTCP ;02/19/98 14:32
;;8.0;MailMan;;Jun 28, 2002
JOB ;Job itself out for TCPQUE.COM to use for polling TCPFLAG'd sites
;
;XMRTCP must have VMS context
;The following code starts job w/o VMS context
;N % S %="MM-TCP-Poller" I $G(XMINST) S ^TMP("XMRTCP",0)=XMINST
;J POLL^XMRTCP:(NAME=%) Q
;
;Start job with VMS CONTEXT
G START^XMRTCPGO
Q
START ;Start XMRTCP w/DCL context
I $G(XMINST) S ^TMP("XMRTCP",0)=XMINST
I ^%ZOSF("OS")["MSM" J POLL^XMRTCP Q
D SPN("XMRTCP","POLL^XMRTCP")
Q
;Spawn out from VMS / run w/DCL context
SPN(X,Y) ;X=Filename right-hand side / Y=Entry point
D DEL N % S F=X_".COM" O F:NEW U F S F=$ZIO
W "$DSM/UCI="_$P($ZU(0),",")_"/ENVIRONMENT="_$$OPTION^%SYSUTL("ENVIRONMENT")_" "_Y,!
S %="$run sys$system:loginout/input="_F_"/output=XMRTCP.log/detach/ast=300/buffer=40960/enqueu=300/file=99/io_buf=64/io_dir=64/job_tab=1024/maximum_work=1864/page=10240/queue_lim=10/work=900/subprocess=30/process=MM-TCP-Poller"
C F S %=$ZC(%SPAWN,%) I 1
Q
DEL N %,X S X="DELER^XMRTCPGO",@^%ZOSF("TRAP")
S %=$ZC(%SPAWN,"DELETE XMRTCP.COM.*")
S %=$ZC(%SPAWN,"DELETE XMRTCP.LOG.*")
DELER Q
XMRTCPGO ;(WASH ISC)/THM/CAP-Start XMRTCP ;02/19/98 14:32
+1 ;;8.0;MailMan;;Jun 28, 2002
JOB ;Job itself out for TCPQUE.COM to use for polling TCPFLAG'd sites
+1 ;
+2 ;XMRTCP must have VMS context
+3 ;The following code starts job w/o VMS context
+4 ;N % S %="MM-TCP-Poller" I $G(XMINST) S ^TMP("XMRTCP",0)=XMINST
+5 ;J POLL^XMRTCP:(NAME=%) Q
+6 ;
+7 ;Start job with VMS CONTEXT
+8 GOTO START^XMRTCPGO
+9 QUIT
START ;Start XMRTCP w/DCL context
+1 IF $GET(XMINST)
SET ^TMP("XMRTCP",0)=XMINST
+2 IF ^%ZOSF("OS")["MSM"
JOB POLL^XMRTCP
QUIT
+3 DO SPN("XMRTCP","POLL^XMRTCP")
+4 QUIT
+5 ;Spawn out from VMS / run w/DCL context
SPN(X,Y) ;X=Filename right-hand side / Y=Entry point
+1 DO DEL
NEW %
SET F=X_".COM"
OPEN F:NEW
USE F
SET F=$ZIO
+2 WRITE "$DSM/UCI="_$PIECE($ZU(0),",")_"/ENVIRONMENT="_$$OPTION^%SYSUTL("ENVIRONMENT")_" "_Y,!
+3 SET %="$run sys$system:loginout/input="_F_"/output=XMRTCP.log/detach/ast=300/buffer=40960/enqueu=300/file=99/io_buf=64/io_dir=64/job_tab=1024/maximum_work=1864/page=10240/queue_lim=10/work=900/subprocess=30/process=MM-TCP-Poller"
+4 CLOSE F
SET %=$ZC(%SPAWN,%)
IF 1
+5 QUIT
DEL NEW %,X
SET X="DELER^XMRTCPGO"
SET @^%ZOSF("TRAP")
+1 SET %=$ZC(%SPAWN,"DELETE XMRTCP.COM.*")
+2 SET %=$ZC(%SPAWN,"DELETE XMRTCP.LOG.*")
DELER QUIT