[613] | 1 | %XUCI ;SF/STAFF - SWAP UCIs M/SQL ;2/19/91 08:48 ;
|
---|
| 2 | ;;8.0;KERNEL;;Jul 10, 1995
|
---|
| 3 | ;FOR M/SQL
|
---|
| 4 | 1 R !,"What UCI: ",%UCI:$S($D(DTIME):DTIME,1:60)," " Q:%UCI=""!(%UCI["^") G 2
|
---|
| 5 | ;
|
---|
| 6 | 2 ;
|
---|
| 7 | I %UCI="PROD"!(%UCI="MGR") S %UCI=^%ZOSF(%UCI)
|
---|
| 8 | S X=%UCI X ^%ZOSF("UCICHECK") G ERR:0[Y
|
---|
| 9 | I $ZJ#2 W:'($D(XUSLNT)!$D(ZTQUEUED)) !,*7,"NO SWITCHING UCI'S IN PROGRAMMER MODE!",! S Y=0 Q
|
---|
| 10 | V D SWAP
|
---|
| 11 | U I '($D(XUSLNT)!$D(ZTQUEUED)) W *7,!,"YOU'RE IN UCI: ",Y,!
|
---|
| 12 | S $ZT="^%ZTER",%=$D(^%ZOSF("OS"))
|
---|
| 13 | K K %,%UCI S Y=1 Q
|
---|
| 14 | ;
|
---|
| 15 | SWAP D ^%ST
|
---|
| 16 | I $ZJ#2=0 ZU 5:X
|
---|
| 17 | Q
|
---|
| 18 | ;
|
---|
| 19 | GO ;
|
---|
| 20 | 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
|
---|
| 21 | K ^XUTL("XQ",$J),^UTILITY($J) G @(U_PGM)
|
---|
| 22 | ;
|
---|
| 23 | DO S %UCI=$P(XQZ,"[",2,9),PGM=$P(XQZ,"[",1),%UCI=$E(%UCI,1,$L(%UCI)-1)
|
---|
| 24 | I %UCI="PROD"!(%UCI="MGR") S %UCI=^%ZOSF(%UCI)
|
---|
| 25 | E S X=%UCI X ^%ZOSF("UCICHECK") G ERR:0[Y
|
---|
| 26 | X ^%ZOSF("UCI") D SAV,D S %UCI=Y D 2^%XUCI,RES Q
|
---|
| 27 | D N Y,%XUCI D 2 G:0'[Y @PGM Q
|
---|
| 28 | SAV S %XUCI="" F %="DUZ","DUZ(0)","DT","DTIME","IO","IO(0)","IOF","IOM","IOST","IOST(0)" S %XUCI=%XUCI_$S($D(@%)#2:@%,1:"")_"^"
|
---|
| 29 | Q
|
---|
| 30 | RES F %=1:1:10 S @($P("DUZ^DUZ(0)^DT^DTIME^IO^IO(0)^IOF^IOM^IOST^IOST(0)","^",%))=$P(%XUCI,"^",%)
|
---|
| 31 | Q
|
---|
| 32 | ;
|
---|
| 33 | ERR W !?9,"'"_X_"' IS AN INVALID UCI!",!
|
---|