ZU ;SF/GFT - For M/SQL, TIE ALL TERMINALS EXCEPT CONSOLE TO THIS ROUTINE!! ;10/31/95 09:53 [ 04/02/2003 8:29 AM ]
;;8.0;KERNEL;**1002,1003,1004,1005,1007**;APR 1, 2003
;;8.0;KERNEL;**13**;Jul 10, 1995
;FOR M/SQL
EN S $ZS=96
S $ZT="ERR^ZU"
S ZUGUI=$G(ZUGUI1)&$G(ZUGUI2) K ZUGUI1,ZUGUI2
G ^XUSG:ZUGUI,^XUS
;
G ;Entry point for GUI device.
S ZUGUI1=1 G EN
;
ERR X ^%ZOSF("NBRK") S $ZT="HALT^ZU" L ;Come here on a error
I $G(IO)]"",$D(IO(1,IO)),$E($G(IOST))="P" U IO W @$S($D(IOF):IOF,1:"#")
I $G(IO(0))]"" U IO(0) W !!,"RECORDING THAT AN ERROR OCCURRED ---",!!?15,"Sorry 'bout that",!,*7,!?10,"$ZERROR=",$ZERROR
S %ZTERLGR="" D ^%ZTER
I $ZE'["<INTERRUPT>" G ^XUSCLEAN
CTRLC W !,"--Interupt Acknowledged",!
S Y=^XUTL("XQ",$J,^XUTL("XQ",$J,"T")-1),Y(0)=$P(Y,"^",2,99),Y=$P("^",1)
S $ZT="ERR^ZU" G M1^XQ
;
HALT S $ZT="" I $D(^XUTL("XQ",$J)) D BYE^XUSCLEAN
HALT
ZU ;SF/GFT - For M/SQL, TIE ALL TERMINALS EXCEPT CONSOLE TO THIS ROUTINE!! ;10/31/95 09:53 [ 04/02/2003 8:29 AM ]
+1 ;;8.0;KERNEL;**1002,1003,1004,1005,1007**;APR 1, 2003
+2 ;;8.0;KERNEL;**13**;Jul 10, 1995
+3 ;FOR M/SQL
EN SET $ZS=96
+1 SET $ZT="ERR^ZU"
+2 SET ZUGUI=$GET(ZUGUI1)&$GET(ZUGUI2)
KILL ZUGUI1,ZUGUI2
+3 IF ZUGUI
GOTO ^XUSG
GOTO ^XUS
+4 ;
G ;Entry point for GUI device.
+1 SET ZUGUI1=1
GOTO EN
+2 ;
ERR ;Come here on a error
XECUTE ^%ZOSF("NBRK")
SET $ZT="HALT^ZU"
LOCK
+1 IF $GET(IO)]""
IF $DATA(IO(1,IO))
IF $EXTRACT($GET(IOST))="P"
USE IO
WRITE @$SELECT($DATA(IOF):IOF,1:"#")
+2 IF $GET(IO(0))]""
USE IO(0)
WRITE !!,"RECORDING THAT AN ERROR OCCURRED ---",!!?15,"Sorry 'bout that",!,*7,!?10,"$ZERROR=",$ZERROR
+3 SET %ZTERLGR=""
DO ^%ZTER
+4 IF $ZE'["<INTERRUPT>"
GOTO ^XUSCLEAN
CTRLC WRITE !,"--Interupt Acknowledged",!
+1 SET Y=^XUTL("XQ",$JOB,^XUTL("XQ",$JOB,"T")-1)
SET Y(0)=$PIECE(Y,"^",2,99)
SET Y=$PIECE("^",1)
+2 SET $ZT="ERR^ZU"
GOTO M1^XQ
+3 ;
HALT SET $ZT=""
IF $DATA(^XUTL("XQ",$JOB))
DO BYE^XUSCLEAN
+1 HALT