LABCX7I ; IHS/DIR/FJE - BECKMAN BIDIRECTIONAL DIRECT CONNECT SETUP ; [ 9/21/90 ]
;;5.2;LA;;NOV 01, 1997
;;5.1;LAB;;04/11/91 11:06
EN ;
;S IOP=IOP_";255",%ZIS="" D ^%ZIS G:POP H^XUS U IO X ^%ZOSF("TYPE-AHEAD"),^%ZOSF("LABOFF"),^%ZOSF("ZPASTHRU") S X=0 X ^%ZOSF("RM") ;JPC - ZPASTHRU CREATED SO CONTROL-C IS PASSED AS *3 AND NOT INTERPRETED
S IOP=IOP_";255",%ZIS="" D ^%ZIS G:POP H^XUS U IO X ^%ZOSF("TYPE-AHEAD"),^%ZOSF("LABOFF") S X=0 X ^%ZOSF("RM") ;IHS/ANMC/CLS 07/12/96
C:IO(0)'=IO IO(0) S DUZ=.5 R X:1,X:1 D SET,^LASET G:TSK=0 H^XUS ;X="TRAP^"_LANM,@^%ZOSF("TRAP") ; MOD JPC - ADDED CHECK FOR TSK=0 IF LASET FAILS
S I=0 F J=0:0 S I=$O(TC(I)) Q:I<1 S:$D(TC(I,4))#2 TS(TC(I,4))=I
S PAR=$S($D(^LAB(62.4,T,.5))#2:^(.5),1:""),OUT="",BASE=0,TOUT=15,U="^",^LA(T,"P")="",^("P1")=3,^("P2")=3,^("P3")=0,DEB="D"_T,LB=1,LBO=2,ETX=3,EOT=4,ENQ=5,ACK=6,NAK=21
Q
SET S:'$D(^LA(T,"I"))#2 ^LA(T,"I")=0,^("I",0)=0
SETO S:'$D(^LA(T,"O"))#2 ^LA(T,"O")=0,^("O",0)=0
Q
LABCX7I ; IHS/DIR/FJE - BECKMAN BIDIRECTIONAL DIRECT CONNECT SETUP ; [ 9/21/90 ]
+1 ;;5.2;LA;;NOV 01, 1997
+2 ;;5.1;LAB;;04/11/91 11:06
EN ;
+1 ;S IOP=IOP_";255",%ZIS="" D ^%ZIS G:POP H^XUS U IO X ^%ZOSF("TYPE-AHEAD"),^%ZOSF("LABOFF"),^%ZOSF("ZPASTHRU") S X=0 X ^%ZOSF("RM") ;JPC - ZPASTHRU CREATED SO CONTROL-C IS PASSED AS *3 AND NOT INTERPRETED
+2 ;IHS/ANMC/CLS 07/12/96
SET IOP=IOP_";255"
SET %ZIS=""
DO ^%ZIS
IF POP
GOTO H^XUS
USE IO
XECUTE ^%ZOSF("TYPE-AHEAD")
XECUTE ^%ZOSF("LABOFF")
SET X=0
XECUTE ^%ZOSF("RM")
+3 ;X="TRAP^"_LANM,@^%ZOSF("TRAP") ; MOD JPC - ADDED CHECK FOR TSK=0 IF LASET FAILS
IF IO(0)'=IO
CLOSE IO(0)
SET DUZ=.5
READ X:1,X:1
DO SET
DO ^LASET
IF TSK=0
GOTO H^XUS
+4 SET I=0
FOR J=0:0
SET I=$ORDER(TC(I))
IF I<1
QUIT
IF $DATA(TC(I,4))#2
SET TS(TC(I,4))=I
+5 SET PAR=$SELECT($DATA(^LAB(62.4,T,.5))#2:^(.5),1:"")
SET OUT=""
SET BASE=0
SET TOUT=15
SET U="^"
SET ^LA(T,"P")=""
SET ^("P1")=3
SET ^("P2")=3
SET ^("P3")=0
SET DEB="D"_T
SET LB=1
SET LBO=2
SET ETX=3
SET EOT=4
SET ENQ=5
SET ACK=6
SET NAK=21
+6 QUIT
SET IF '$DATA(^LA(T,"I"))#2
SET ^LA(T,"I")=0
SET ^("I",0)=0
SETO IF '$DATA(^LA(T,"O"))#2
SET ^LA(T,"O")=0
SET ^("O",0)=0
+1 QUIT