source: FOIAVistA/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZISETUPM.m@ 1697

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1ZISETUPM ;BB,SF/GFT,AC - INITIALIZES DEVICE AND TERMINAL TYPES FOR INTERSYSTEMS;1/12/88 12:45 PM ;1/20/93 15:47
2 ;;7.1;KERNEL;;Jun 08, 1993
3 W !,"THIS ROUTINE WILL TAKE INTERSYSTEMS TERMINAL AND SUBTYPE FILES",!,"(IN ^%IS) AND MOVE THEM TO THE ^%ZIS FILES.",!!
4 R "OK? ",X:$S($D(DTIME):DTIME,1:60),!! G EXIT:X'?1"Y".E
5 L +^%ZIS:2 W:'$T !,"FILE IS IN USE. TRY AGAIN LATER!!!",*7 Q:'$T
6 I '$D(^%ZIS(1,0)) S ^%ZIS(1,0)="DEVICE^3.5"
7 S U="^",%ZISV=$S($D(^%ZOSF("VOL")):^("VOL"),1:"")
8QUES I %ZISV]"" W !,"Please Enter a Prefix for New Devices: "_%ZISV_"//" R %ZISV1:$S($D(DTIME):DTIME,1:300) G EXIT:%ZISV1="^"!'$T S:%ZISV1="" %ZISV1=%ZISV I %ZISV1?1"?"."?" D HLP G QUES
9 F L=64:1:200,1 K ^DISV(L,"^%ZIS(1,")
10SUB S (C,L,N)=0 I $D(^%ZIS(2,0)) S N=$P(^(0),U,4),L=$P(^(0),U,3)
11 W "TERMINAL TYPES:",!
12A S C=$O(^%IS(0,"SUB",C))
13 I C="" S R=$S($D(^%ZIS(2,0)):^(0),1:"TERMINAL TYPE^3.2"),^(0)=$P(R,U,1,2)_U_L_U_N G DEVICE
14 S R=^(C),Z=$S($D(^(C,1)):^(1),1:"") G A:$D(^%ZIS(2,"B",C)) I Z?."^" S Z=""
15 F L=L+1:1 I '$D(^%ZIS(2,L,0)) S ^(0)=C,^(1)=R,^%ZIS(2,"B",C,L)="",N=N+1 W C,! Q
16 I Z]"" S X=$P(Z,U,1,5)_U_$P(Z,U,11),^%ZIS(2,L,6)=X,X=$P(Z,U,10,12) D X
17 W !,C G A
18 ;
19X I X?."^" Q
20 S X=$P(X,U,1)_U_$P(X,U,3) I '$D(^%ZIS(2,N,5)) S ^(5)=X
21 Q
22 ;
23DEVICE S U="^",(L,N)=0 I $D(^%ZIS(1,0)) S N=$P(^(0),U,4),L=$P(^(0),U,3)
24 W !!,"DEVICES:",!
25 S I=0 F Y=0:0 S I=$O(^%IS(I)) Q:I'>0 I $D(^(I,0)),$D(^(1)),^(1)]"" S C=^(1),X=^(0) D CHK
26 F I=0:0 S I=$O(^%ZIS(1,I)) Q:I'>0 I '$D(^(I,99)) S C=$P(^(0),U,1) I $D(^%IS(C,99)),^(99)]"" S C=$O(^%ZIS(1,"B",^(99),0)) I C>0 S ^%ZIS(1,I,99)=C
27 S C=$S($D(^%ZIS(1,0)):^(0),1:"DEVICE^3.5"),^(0)=$P(C,U,1,2)_U_L_U_N
28C K ^%ZIS("C") S ^%ZIS("C")="G ^%ZISC"
29 W !!,"ALL SETUP"
30EXIT L -^%ZIS K %ZISV,%ZISV1,C,I,I1,L,N,R,X,Y Q
31 ;
32CHK I $P(C,U,1)'=I,'$D(^%ZIS(1,"B",I)) S I1=I D ADD Q
33 I $P(C,U,1)=I,'$S(%ZISV]"":$S($O(^%ZIS(1,"G","SYS."_%ZISV_"."_$P(C,U,1),0))>0:1,$O(^%ZIS(1,"CPU",%ZISV_"."_$P(C,U,1),0))>0:1,1:0),$O(^%ZIS(1,"C",$P(C,U,1),0))>0:1,1:0) S I1=%ZISV1_I D ADD Q
34 Q
35ADD W I1,! F L=L+1:1 I '$D(^%ZIS(1,L,0)) Q
36 S ^%ZIS(1,"C",$P(C,U,1),L)="",^%ZIS(1,"B",I1,L)="",^%ZIS(1,L,0)=I1_U_$P(C,U,1)_U_($P(C,U,4)'=1)_U_'$P(C,U,4),^("TYPE")=$P(C,U,2),^("IOPAR")=$P(C,U,6),N=N+1 I X'?." " S ^(1)=X
37 I '$D(^%ZIS(1,"G","SYS."_%ZISV_"."_$P(C,U,1))) S ^("SYS."_%ZISV_"."_$P(C,U,1),L)="",$P(^%ZIS(1,L,0),U,11)=1
38 I '$D(^%ZIS(1,"CPU",%ZISV_"."_$P(C,U,1),L)) S ^(L)=""
39 S C=$P(C,U,3) I C]"" S C=$O(^%ZIS(2,"B",C,0)) I $D(^%ZIS(2,+C,0)) S ^%ZIS(1,L,"SUBTYPE")=C
40 F X=90,91,95,"L","F" I $D(^%IS(I,X))#2,^(X)]"" S ^%ZIS(1,L,X)=^(X) S:+X'=X ^%ZIS(1,X,^(X),L)=""
41 Q
42HLP ;HELP FOR PREFIX QUESTION
43 W !,"There must be a prefix for a new device"
44 W !,"becuase the Device Name and the $I cannot"
45 W !,"be the same." Q
Note: See TracBrowser for help on using the repository browser.