ZU ;SF/GFT - For MSM, TIE ALL TERMINALS EXCEPT CONSOLE TO THIS ROUTINE!! ;08/24/98 11:26
;;8.0;KERNEL;**1005**;FEB 24, 1999
;;8.0;KERNEL;**13,42,49,94**;Jul 10, 1995
;FOR MSM-DOS and MSM-UNIX
EN S $ZT="ERR^ZU",ZUGUI2=$$GUI()
D:+$G(^%ZTSCH("LOGRSRC")) LOGRSRC^%ZOSV("$LOGIN$")
;The next line keeps sign-on users from taking the last slot
;It can be commented out if not needed.
JOBCHK X ^%ZOSF("AVJ") I Y<3 W $C(7),!!,"** TROUBLE ** - ** CALL IRM NOW! **" G HALT
;Bump up the partition size
D GETENV^%ZOSV S Y=$P(Y,"^",4),%=$O(^%ZIS(14.7,"B",Y,0)),Y=$G(^%ZIS(14.7,+%,0)),%K=$P(Y,"^",5) I %K>0 D INT^%PARTSIZ
G ^XUSG:$G(ZUGUI1),^XUS
;
G ;Entry point for GUI device.
S ZUGUI1=1 G EN
;
ERR S $ZT="HALT^ZU" L ;Come here on error.
B 0 ;Turn off break
S %ZTERLGR=$ZR,%ZT("^XUTL(""XQ"",$J)")="" D ^%ZTER
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
X ^%ZOSF("PROGMODE") Q:Y S $ZT="HALT^ZU"
I $ZE'["<INRPT>" S XUERF="" G ^XUSCLEAN
CTRLC I $D(IO)=11 U IO(0) W !,"--Interrupt Acknowledged",!
D KILL1^XUSCLEAN ;Clean up symbol table
;
CTRLC2 G:$G(^XUTL("XQ",$J,"T"))<2 ^XUSCLEAN
S ^XUTL("XQ",$J,"T")=1,XQY=^(1),XQY0=$P(XQY,"^",2,99)
G:$P(XQY0,"^",4)'="M" CTRLC2
S XQPSM=$P(XQY,"^",1),XQY=+XQPSM,XQPSM=$P(XQPSM,XQY,2,3)
G:'XQY ^XUSCLEAN
S $ZT="ERR^ZU" G M1^XQ
;
HALT S $ZT="" I $D(^XUTL("XQ",$J)) D BYE^XUSCLEAN
D:+$G(^%ZTSCH("LOGRSRC")) LOGRSRC^%ZOSV("$LOGOUT$")
HALT
;
GUI() ;Test if under GUI
Q "" ;Just say No.
S $ZT="GUIX",X="" G:$PD'=1 GUIX
S X=$G(^$DI($PD,"PLATFORM"))
GUIX Q X
ZU ;SF/GFT - For MSM, TIE ALL TERMINALS EXCEPT CONSOLE TO THIS ROUTINE!! ;08/24/98 11:26
+1 ;;8.0;KERNEL;**1005**;FEB 24, 1999
+2 ;;8.0;KERNEL;**13,42,49,94**;Jul 10, 1995
+3 ;FOR MSM-DOS and MSM-UNIX
EN SET $ZT="ERR^ZU"
SET ZUGUI2=$$GUI()
+1 IF +$GET(^%ZTSCH("LOGRSRC"))
DO LOGRSRC^%ZOSV("$LOGIN$")
+2 ;The next line keeps sign-on users from taking the last slot
+3 ;It can be commented out if not needed.
JOBCHK XECUTE ^%ZOSF("AVJ")
IF Y<3
WRITE $CHAR(7),!!,"** TROUBLE ** - ** CALL IRM NOW! **"
GOTO HALT
+1 ;Bump up the partition size
+2 DO GETENV^%ZOSV
SET Y=$PIECE(Y,"^",4)
SET %=$ORDER(^%ZIS(14.7,"B",Y,0))
SET Y=$GET(^%ZIS(14.7,+%,0))
SET %K=$PIECE(Y,"^",5)
IF %K>0
DO INT^%PARTSIZ
+3 IF $GET(ZUGUI1)
GOTO ^XUSG
GOTO ^XUS
+4 ;
G ;Entry point for GUI device.
+1 SET ZUGUI1=1
GOTO EN
+2 ;
ERR ;Come here on error.
SET $ZT="HALT^ZU"
LOCK
+1 ;Turn off break
BREAK 0
+2 SET %ZTERLGR=$ZR
SET %ZT("^XUTL(""XQ"",$J)")=""
DO ^%ZTER
+3 IF $GET(IO)]""
IF $DATA(IO(1,IO))
IF $EXTRACT($GET(IOST))="P"
USE IO
WRITE @$SELECT($DATA(IOF):IOF,1:"#")
+4 IF $GET(IO(0))]""
USE IO(0)
WRITE !!,"RECORDING THAT AN ERROR OCCURRED ---",!!?15,"Sorry 'bout that",!,*7,!?10,"$ZERROR=",$ZERROR
+5 XECUTE ^%ZOSF("PROGMODE")
IF Y
QUIT
SET $ZT="HALT^ZU"
+6 IF $ZE'["<INRPT>"
SET XUERF=""
GOTO ^XUSCLEAN
CTRLC IF $DATA(IO)=11
USE IO(0)
WRITE !,"--Interrupt Acknowledged",!
+1 ;Clean up symbol table
DO KILL1^XUSCLEAN
+2 ;
CTRLC2 IF $GET(^XUTL("XQ",$JOB,"T"))<2
GOTO ^XUSCLEAN
+1 SET ^XUTL("XQ",$JOB,"T")=1
SET XQY=^(1)
SET XQY0=$PIECE(XQY,"^",2,99)
+2 IF $PIECE(XQY0,"^",4)'="M"
GOTO CTRLC2
+3 SET XQPSM=$PIECE(XQY,"^",1)
SET XQY=+XQPSM
SET XQPSM=$PIECE(XQPSM,XQY,2,3)
+4 IF 'XQY
GOTO ^XUSCLEAN
+5 SET $ZT="ERR^ZU"
GOTO M1^XQ
+6 ;
HALT SET $ZT=""
IF $DATA(^XUTL("XQ",$JOB))
DO BYE^XUSCLEAN
+1 IF +$GET(^%ZTSCH("LOGRSRC"))
DO LOGRSRC^%ZOSV("$LOGOUT$")
+2 HALT
+3 ;
GUI() ;Test if under GUI
+1 ;Just say No.
QUIT ""
+2 SET $ZT="GUIX"
SET X=""
IF $PDISPLAY'=1
GOTO GUIX
+3
*** ERROR ***
SET X=$GET(^$DI($PDISPLAY,"PLATFORM"))
GUIX QUIT X