1 | %XUCI ;SFISC/STAFF,PUG/TOAD - SWAP UCIs GT.M ;20 May 2003 8:43 am
|
---|
2 | ;;8.0;KERNEL;**275**;Jul 10, 1995;
|
---|
3 | ; for GT.M for Unix & VMS, version 4.3--based on single UCI model
|
---|
4 | ;
|
---|
5 | 1 W !,"GT.M doesn't have an equivlent to UCI's.",!,"You will remain in this enviroment."
|
---|
6 | R !,"What UCI: ",%UCI:$S($D(DTIME):DTIME,1:10)," " Q:%UCI=""!(%UCI["^")
|
---|
7 | G 2
|
---|
8 | ;
|
---|
9 | 2 ;For GT.M this is a NOP, Return Y.
|
---|
10 | X ^%ZOSF("UCI")
|
---|
11 | U I '($D(XUSLNT)!$D(ZTQUEUED)) W *7,!,"YOU'RE IN UCI: ",Y,!
|
---|
12 | S %=$D(^%ZOSF("OS"))
|
---|
13 | K K %,%UCI S Y=1 Q
|
---|
14 | ;
|
---|
15 | SWAP ;
|
---|
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 | ;
|
---|
19 | ENT G 2:$D(%UCI)#2,1
|
---|
20 | ;
|
---|
21 | GO ;GOTO some routine
|
---|
22 | D 2 Q:0[Y
|
---|
23 | S X=PGM I PGM'?1"%".E X ^%ZOSF("TEST") I '$T W !?9,"'"_X_"' DOES NOT EXIST IN "_%UCI,! HALT
|
---|
24 | K ^XUTL("XQ",$J),^UTILITY($J) G @(U_PGM)
|
---|
25 | ;
|
---|
26 | DO ;Do some routine and return
|
---|
27 | S %UCI=$P(XQZ,"[",2,9),PGM=$P(XQZ,"[",1),%UCI=$E(%UCI,1,$L(%UCI)-1)
|
---|
28 | D SAV,D S %UCI=Y D 2,RES Q
|
---|
29 | D N Y,%XUCI D 2 Q:0[Y G @PGM Q
|
---|
30 | ;
|
---|
31 | SAV 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
|
---|
33 | RES F %=1:1:10 S @($P("DUZ^DUZ(0)^DT^DTIME^IO^IO(0)^IOF^IOM^IOST^IOST(0)","^",%))=$P(%XUCI,"^",%)
|
---|
34 | Q
|
---|
35 | ;
|
---|
36 | ERR W !?9,"'"_X_"' IS AN INVALID UCI!",!
|
---|