source: WorldVistAEHR/trunk/r/VICTORY_PROGRAMMING_ENVIRONMENT-ZVEM/ZVEMSGC.m@ 789

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

initial load of WorldVistAEHR

File size: 3.0 KB
Line 
1ZVEMSGC ;DJB,VSHL**VShell Global - ZA,ZC,ZO,ZQ ; 4/5/03 7:32am
2 ;;12;VPE;;COPYRIGHT David Bolduc @1993
3 ;
4ZA ;;;Main area for processing users input at >> prompt.
5 S @($$T^%ZVEMSY) X ^%ZVEMS("ZO",4),^%ZVEMS("ZO",2) F Q:'$D(^%ZVEMS) X ^%ZVEMS("ZA",6) I $G(VEESHC)]"" Q:VEESHC="^" W ! X ^%ZVEMS("ZO",1),VEESHC D RESET^%ZVEMSY X ^%ZVEMS("ZS",2)
6 X ^%ZVEMS("ZK",4),^%ZVEMS("ZA",4) Q:"^"[VEESHC X:VEESHC="<TO>" ^%ZVEMS("ZT",1) Q:"^"[VEESHC X ^%ZVEMS("ZS",4),$S(VEESHC?1.2".":^%ZVEMS("ZQ",1),VEESHC?1.2"."1A.E:^%ZVEMS("ZQ",1),1:^%ZVEMS("ZA",3))
7 I VEESHC?1"<".E1">"!(VEESHC?1.2"."1N.E) D ^%ZVEMSQ S VEESHC=$S(VEESHC?1"**".E:$E(VEESHC,3,999),1:"") I VEESHC]"" X ^%ZVEMS("ZA",2) ;CLH
8 S:VEESHC?.E1P1"VEESHL".1P.E VEESHC="" S:$E(VEESHC)="?"!(VEESHC="<ESCH>") VEESHC="D ^%ZVEMSH" I ",^,H,h,HALT,halt,"[(","_VEESHC_",") S VEESHC="^"
9 X ^%ZVEMS("ZS",3),^%ZVEMS("ZA",7),^%ZVEMS("ZO",2) KILL VEEWARN S VEESHL="RUN" D USEZERO^%ZVEMSU ;Reset variables
10 X ^%ZVEMS("ZA",5),^%ZVEMS("ZR",1) Q:"^"[VEESHC X ^%ZVEMS("ZA",2) Q:"^"[VEESHC X ^%ZVEMS("ZC",1) KILL VEEWARN
11 I $G(VEE("OS"))=8 X "ZM 0" ;Disable MSM trace function
12 ;;;***
13ZC ;;;Check for Global KILL
14 Q:$G(VEEWARN)="QWIK" NEW HLD X ^%ZVEMS("ZQ",2) I HLD["K",HLD["^" NEW FLAGG S FLAGG="GLB" D KILLCHK^%ZVEMKU(HLD)
15 ;;;***
16ZK ;;;Exit Shell-KILL ^%ZVEMS("%"). VA KERNEL interface.
17 X:'$D(VEE("ID"))!('$D(VEE("OS"))) ^%ZVEMS("ZS",3) X ^%ZVEMS("ZK",3) Q:$G(VEESHC)="NO EXIT" X ^%ZVEMS("ZK",2),^%ZVEMS("ZK",5),^%ZVEMS("ZK",6),^%ZVEMS("ZK",7),^%ZVEMS("ZK",9)
18 Q:'$D(^%ZVEMS("%",$J_$G(^%ZVEMS("SY")),"XUTL")) KILL ^XUTL("XQ",$J) NEW %X,%Y S %X="^%ZVEMS(""%"","""_$J_$G(^%ZVEMS("SY"))_""",""XUTL"",",%Y="^XUTL(""XQ"",$J," D %XY^%RCR
19 NEW U1,U2 X ^%ZVEMS("ZK",8) I U1]"",U2]"",U1'=U2 S VEESHC="NO EXIT" W $C(7),!!?2,"VA KERNEL menu option active.",!?2,"Move to UCI '",U2,"' to HALT.",!
20 I $D(^XUSEC(0)),",D ^ZU,DO ^ZU,d ^zu,do ^zu,d ^ZU,do ^ZU,"[(","_VEESHC_",") S VEESHC="" W $C(7),!!?2,"HALT out of VSHELL before calling ^ZU.",!
21 I VEE("OS")=9,$D(^%ZVEMS("%",$J_$G(^%ZVEMS("SY")),"DTM")) X "U $I:(IXXLATE=$P(^(""DTM""),""^"",1))"
22 I $D(^%ZVEMS("%",$J_$G(^%ZVEMS("SY")),"KRNUCI")) D NOBRK^%ZVEMKY2
23 I $D(^%ZVEMS("%",$J_$G(^%ZVEMS("SY")),"SYMTAB")) D RESSYM^%ZVEMSU ;Restore sym table
24 S U1=$G(^%ZVEMS("CLH","UCI",VEE("ID")_$G(^%ZVEMS("SY")))),U2=$G(^%ZVEMS("%",$J_$G(^%ZVEMS("SY")),"KRNUCI"))
25 KILL ^%ZVEMS("%",$J_$G(^%ZVEMS("SY")))
26 ;;;***
27ZO ;;;Other
28 NEW X S:$G(VEE("$ZR"))]"" @("X=$"_$S(VEE("$ZR")["(":"O",1:"D")_"("_VEE("$ZR")_")") I $G(VEE("$T")) ;Reset $ZR and $T
29 Q:'$D(VEE("ID")) Q:'$D(^%ZOSF("UCI")) NEW Y X ^("UCI") Q:$G(^%ZVEMS("CLH","UCI",VEE("ID")_$G(^%ZVEMS("SY"))))=Y X ^%ZVEMS("ZO",3)
30 S ^%ZVEMS("CLH","UCI",VEE("ID")_$G(^%ZVEMS("SY")))=Y KILL ^%ZVEMS("CLH",VEE("ID"),"VSHL") ;Kill VShell's CLH if user switches UCIs.
31 S:$D(%1) X=%1 KILL:'$D(%1) X KILL %1 ;Reset X after ^%ZOSF("TRAP")
32 ;;;***
33ZQ ;;;Process QWIK Commands. VEEWARN turns off Global Kill Warning.
34 NEW HLD S VEEWARN="QWIK" X ^%ZVEMS("ZQ",2) D QWIK^%ZVEMSQS(HLD)
35 S HLD=$TR(VEESHC,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
36 ;;;***
Note: See TracBrowser for help on using the repository browser.