source: FOIAVistA/trunk/r/TOOLKIT-AWCM-XD-XIN-XPAR-XQAB-XT-XUC-XUR-ZIN-ZTED/XUCIVXD.m@ 1608

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

initial load of FOIAVistA 6/30/08 version

File size: 1.4 KB
Line 
1%XUCI ;SFISC/STAFF - SWAP UCIs VAX/DSM ;1/23/96 09:28
2 ;;8.0;KERNEL;**13**;Jul 10, 1995
3 ;FOR VAX-DSM
41 R !,"What UCI: ",%UCI:$S($D(DTIME):DTIME,1:10)," " Q:%UCI=""!(%UCI["^") G 2
5 ;
62 ;
7 I %UCI="PROD"!(%UCI="MGR") S %UCI=^%ZOSF(%UCI)
8 S X=%UCI X ^%ZOSF("UCICHECK") G ERR:0[Y
9 X ^%ZOSF("PROGMODE") I Y W:'($D(XUSLNT)!$D(ZTQUEUED)) !,*7,"NO SWITCHING UCI'S IN PROGRAMMER MODE!",! S Y=0 Q
10V D SWAP
11U I '($D(XUSLNT)!$D(ZTQUEUED)) W *7,!,"YOU'RE IN UCI: ",$ZU(0),!
12 S $ZT="^%ZTER",%=$D(^%ZOSF("OS"))
13K K %,%UCI S Y=1 Q
14 ;
15SWAP ;
16 X ^%ZOSF("PROGMODE") I 'Y S X=$S(X[",":$ZC(%SETUCI,$P(X,","),$P(X,",",2)),1:$ZC(%SETUCI,$P(X,","))),X=$ZC(%PGMSET),X=$ZC(%SECMAP)
17 Q
18 ;
19ENT G 2:$D(%UCI)#2,1
20 ;
21GO ;
22 D 2 Q:0[Y S X=PGM I PGM'?1"%".E X ^%ZOSF("TEST") I '$T W !?9,"'"_X_"' DOES NOT EXIST IN "_%UCI,! HALT
23 S X=$&ZLIB.%SETSYM("DHCP$UCI_CHANGE",1)
24 K ^XUTL("XQ",$J),^UTILITY($J) G @(U_PGM)
25 ;
26DO S %UCI=$P(XQZ,"[",2,9),PGM=$P(XQZ,"[",1),%UCI=$E(%UCI,1,$L(%UCI)-1)
27 I %UCI="PROD"!(%UCI="MGR") S %UCI=^%ZOSF(%UCI)
28 E S X=%UCI X ^%ZOSF("UCICHECK") G ERR:0[Y
29 X ^%ZOSF("UCI") D SAV,D S %UCI=Y D 2,RES Q
30D N Y,%XUCI D 2 Q:0[Y G @PGM Q
31SAV S %XUCI="" F %="DUZ","DUZ(0)","DT","DTIME","IO","IO(0)","IOF","IOM","IOST","IOST(0)" S %XUCI=%XUCI_$S($D(@%)#2:@%,1:"")_"^"
32 Q
33RES F %=1:1:10 S @($P("DUZ^DUZ(0)^DT^DTIME^IO^IO(0)^IOF^IOM^IOST^IOST(0)","^",%))=$P(%XUCI,"^",%)
34 Q
35 ;
36ERR W !?9,"'"_X_"' IS AN INVALID UCI!",!
Note: See TracBrowser for help on using the repository browser.