source: WorldVistAEHR/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZUMSM.m@ 1437

Last change on this file since 1437 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.1 KB
Line 
1ZU ;SFISC/RWF - For MSM-NT and MSM-UNIX, TIE all User terminals to this routine!! ;06/20/2000 11:31
2 ;;8.0;KERNEL;**13,42,49,94,107,162**;Jul 10, 1995
3 ;FOR MSM-NT and MSM-UNIX v4.3 or greater
4EN N $ESTACK S $ECODE="",$ETRAP="D ERR^ZU Q:$QUIT 0 Q" ;,ZUGUI2=$$GUI()
5 ;The next line keeps sign-on users from taking the last slot
6 ;It can be commented out if not needed.
7JOBCHK X ^%ZOSF("AVJ") I Y<3 W $C(7),!!,"** TROUBLE ** - ** CALL IRM NOW! **" G HALT
8 D:+$G(^%ZTSCH("LOGRSRC")) LOGRSRC^%ZOSV("$LOGIN$")
9 ;Bump up the partition size, Task partition size if file 14.7
10 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
11 G ^XUS ;G ^XUSG:$G(ZUGUI1),^XUS
12 ;
13G ;Entry point for GUI device.
14 S ZUGUI1=1 G EN
15 ;
16ERR ;Come here on error.
17 I $ZE["STKOVR" S $ET="Q:$ST>"_($ST-8)_" D ERR2^ZU" Q
18ERR2 S $ETRAP="D UNWIND^ZU" L B 0 ;Unlock, Turn off break
19 Q:$ECODE["<PROG>"
20 I $G(IO)]"",$D(IO(1,IO)),$E($G(IOST))="P" U IO W @$S($D(IOF):IOF,1:"#")
21 I $G(IO(0))]"" U IO(0) W !!,"RECORDING THAT AN ERROR OCCURRED ---",!!?15,"Sorry 'bout that",!,*7,!?10,"$STACK=",$STACK,", $ECODE=",$ECODE,!?10,"$ZERROR=",$ZERROR
22 D ^%ZTER
23 I $EC'["<INRPT>" S XUERF="",$EC="" G ^XUSCLEAN
24CTRLC I $D(IO)=11 U IO(0) C:IO'=IO(0) IO S IO=IO(0)
25 W !,"--Interrupt Acknowledged",!
26 D KILL1^XUSCLEAN ;Clean up symbol table
27 S $ECODE=",U<<POP>>,"
28 Q
29 ;
30UNWIND ;Unwind the stack
31 Q:$ESTACK>1 G CONT:$ECODE["<<HALT>>",CTRLC2:$ECODE["<<POP>>"
32 S $ECODE=""
33 Q
34 ;
35CTRLC2 S $ECODE="" G:$G(^XUTL("XQ",$J,"T"))<2 ^XUSCLEAN
36 S ^XUTL("XQ",$J,"T")=1,XQY=$G(^(1)),XQY0=$P(XQY,"^",2,99)
37 G:$P(XQY0,"^",4)'="M" CTRLC2
38 S XQPSM=$P(XQY,"^",1),XQY=+XQPSM,XQPSM=$P(XQPSM,XQY,2,3)
39 G:'XQY ^XUSCLEAN
40 S $ECODE="",$ETRAP="S %ZTER11S=$STACK D ERR^ZU Q:$QUIT 0 Q" G M1^XQ
41 ;
42HALT I $D(^XUTL("XQ",$J)) D:$D(DUZ)#2 BYE^XUSCLEAN
43 D:+$G(^%ZTSCH("LOGRSRC")) LOGRSRC^%ZOSV("$LOGOUT$")
44 I '$ESTACK G CONT
45 S $ETRAP="D UNWIND^ZU" ;Set new trap
46 S $ECODE=",U<<HALT>>," ;Cause error to unwind stack
47 Q
48CONT ;
49 S $ECODE="",$ETRAP=""
50 HALT
51 ;
52GUI() ;Test if under GUI
53 Q "" ;Just say No.
54 S $ZT="GUIX",X="" G:$PD'=1 GUIX
55 S X=$G(^$DI($PD,"PLATFORM"))
56GUIX Q X
Note: See TracBrowser for help on using the repository browser.