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/ZUVXD.m@ 861

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

initial load of WorldVistAEHR

File size: 2.8 KB
RevLine 
[613]1ZU ;SF/JLI,RWF - For DSM, TIE ALL TERMINALS TO THIS ROUTINE!! ;07/09/2001 13:31
2 ;;8.0;KERNEL;**13,24,84,94,118,162,225**;Jul 10, 1995
3 ;FOR VAX-DSM V5 & V6
4EN ;See that escape processing is off, Conflict with Screenman
5 S X=$&ZLIB.%DISABLCTRL($C(25)) U $I:(NOCENABLE:NOESCAPE)
6 D:+$G(^%ZTSCH("LOGRSRC")) LOGRSRC^%ZOSV("$LOGIN$")
7 S (ZUGUI1,ZUGUI2)="" ;$&ZLIB.%TRNLNM("DECW$DISPLAY",,,,,"VALUE")
8 N $ESTACK,$ETRAP S $ETRAP="S %ZTER11S=$STACK D ERR^ZU Q:$QUIT 0 Q"
9 ;Only call ShareLic for Telnet connections.
10 D:$I["_TNA" SHARELIC^%ZOSV(0)
11 G ^XUS
12 ;
13G ;Entry point for GUI device.
14 Q ;S ZUGUI1=1 G EN
15ERR ;Come here on error
16 I $ZE["STKOVR" S $ET="Q:$ST>"_($ST-8)_" D ERR2^ZU" Q
17ERR2 S $ETRAP="D UNWIND^ZU" L U $I:NOCENABLE
18 Q:$ECODE["<PROG>"
19 I $ZE["^XUS1A:2, %DSM-E-WRITERR" G HALT
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 K %ZT S XUERF="" ; Capture symbol table first!
23 I $D(%ZTERROR),$P(%ZTERROR,"^",2)="F" H ; Halt immediately for disaster type FATAL errors
24 ;U $I:NOCENABLE D PROGMODE^%ZOSV I Y U $I:CENABLE Q
25 I $G(DUZ)'>0 HALT
26 ;
27CTRLC I $D(IO)=11 U IO(0) C:IO'=IO(0) IO S IO=IO(0)
28 W:$ZE["-CTLC" !,"--Interrupt Acknowledged",!
29 D KILL1^XUSCLEAN ;Clean up symbol table
30 S $ECODE=",<<POP>>,"
31 Q
32 ;
33UNWIND ;Unwind the stack
34 Q:$ESTACK>1 G CONT:$ECODE["<<HALT>>",CTRLC2:$ECODE["<<POP>>"
35 S $ECODE=""
36 Q
37 ;
38CTRLC2 S $ECODE="" G:$G(^XUTL("XQ",$J,"T"))<2 ^XUSCLEAN
39 S ^XUTL("XQ",$J,"T")=1,XQY=$G(^(1)),XQY0=$P(XQY,"^",2,99)
40 G:$P(XQY0,"^",4)'="M" CTRLC2
41 S XQPSM=$P(XQY,"^",1),XQY=+XQPSM,XQPSM=$P(XQPSM,XQY,2,3)
42 G:'XQY ^XUSCLEAN
43 S $ECODE="",$ETRAP="S %ZTER11S=$STACK D ERR^ZU Q:$QUIT 0 Q"
44 U $I:NOESCAPE G M1^XQ
45 ;
46HALT I $D(^XUTL("XQ",$J)) D:$D(DUZ)#2 BYE^XUSCLEAN
47 I '$ESTACK G CONT
48 S $ETRAP="D UNWIND^ZU" ;Set new trap
49 S $ECODE=",<<HALT>>," ;Cause error to unwind stack
50 D:+$G(^%ZTSCH("LOGRSRC")) LOGRSRC^%ZOSV("$LOGOUT$")
51 Q
52CONT ;
53 S $ECODE="",$ETRAP=""
54 D:+$G(^%ZTSCH("LOGRSRC")) LOGRSRC^%ZOSV("$LOGOUT$")
55 ;Halt If User changed UCI's
56 I $&ZLIB.%GETSYM("DHCP$UCI_CHANGE") HALT
57 ;Quit up to ZSLOT
58 I $L($&ZLIB.%GETSYM("ZSLOT")) QUIT
59 ;Halt If a dialup line
60 S %=$&ZLIB.%GETDVI($I,"TT_DIALUP") I %!$D(XQXFLG("HALT")) HALT
61 ;Halt If a Telnet connection
62 I ($P["_TNA")!$D(XQXFLG("HALT")) HALT
63 S X="Waiting "_($J#1000000) D SETENV^%ZOSV ;Change VMS name
64 ;For sites that want to retain the connection, uncomment the next line
65 ;U $I:NOCENABLE R !,"Enter return to continue: ",X:600 S:'$T X="^" G:X'="^" ^ZU
66 HALT
67SLOT ;Entry point from ZSLOT
68 N ZIO,ZTIME
69 D LOG G EN
70 ;
71LOG ;Define some nessary Logical names for ZSLOT
72 S %=$&ZLIB.%CRELOG("SYS$INPUT",$I,"SUPERVISOR")
73 S %=$&ZLIB.%CRELOG("SYS$OUTPUT",$I,"SUPERVISOR")
74 S %=$&ZLIB.%CRELOG("SYS$COMMAND",$I,"SUPERVISOR")
75 Q
Note: See TracBrowser for help on using the repository browser.