DEC-TCPCHAN (28)    TRANSMISSION SCRIPT (4.6)

Name Value
NAME DEC-TCPCHAN
TEXT
X L +^XMBX("TCPCHAN",XMHOST):3 E  S ER=1,XMER="CHANNEL IN USE"
X S IO=IO(0) X ^%ZOSF("EON")
X S XMRPORT=1025,XMSIO="XMRPORT:(TCPCHAN,ADDRESS=XMHOST):5"
X O @XMSIO E  S ER=1 L -^XMBX("TCPCHAN",XMHOST)
X U XMRPORT:NOECHO S XMLTCP="" W "NOOP "_^XMB("NETNAME"),$C(10),!
X S XMHANG="C XMRPORT" S IO=XMRPORT,IOST(0)=0
X U XMRPORT R XMRG:30 I XMRG'["TCP/IP CONNECTION ESTABLISHED" S ER=1 L -^XMBX("TCPCHAN",XMHOST) K XMHOST,XMRPORT,XMSIO
X D OTHER^XMRTCP(.XMRG,.ER) I ER L -^XMBX("TCPCHAN",XMHOST)
MAIL
X L -^XMBX("TCPCHAN",XMHOST) K XMSIO