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

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1ZISETMSM ;IHS/MJ,ACC, SFISC/AC -- INITIALIZE DEVICE FILE FOR MSM-68 [ 05/02/89 4:42 PM ] ;4/9/92 14:17
2 ;;7.1;KERNEL;;Jun 08, 1993
3 S %PC=$ZV["MSM-PC"
4 W !,"THIS ROUTINE TAKES INITIALIZES THE DEVICE FILE WITH CURRENT PORT NUMBERS",!
5 R "OK? ",X,!! G:X'?1"Y".E EXIT
6 L +^%ZIS:2 W:'$T !,"FILE IS IN USE. TRY AGAIN LATER!!!",*7 Q:'$T
7 I '$D(^%ZIS(1,0)) S ^%ZIS(1,0)="DEVICE^3.5"
8 S T=$P(^(0),"^",4),M=^%ZOSF("MGR"),%ZISV=$S($D(^%ZOSF("VOL")):^("VOL"),1:"") D FLST
9QUES 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
10SYS S TYPE="",CONFIG=$P(^SYS("CONFIG"),";",1),CONFIG=+^SYS("CONFIG",CONFIG) ;DEFAULT SUBSCRIPTS TTY=0
11 S TTY=0
12DDB S TTY=$O(^SYS(CONFIG,"DDB",TTY)) I TTY'="" S DEF=^(TTY),I=TTY D CHK G DDB
13HFS ;INITIALIZE HOST FILE SERVER
14 S TYPE="HFS" F I=51:1:$S(%PC:52,1:54) D CHK
15 ;S ^(0)=$P(^%ZIS(1,0),"^",1,2)_"^^"_TL
16C K ^%ZIS("C") S ^%ZIS("C")="G ^%ZISC"
17 W !!,"ALL SETUP" G EXIT
18CHK Q:$S(%ZISV]"":$S($O(^%ZIS(1,"G","SYS."_%ZISV_"."_I,0))>0:1,$O(^%ZIS(1,"CPU",%ZISV_"."_I,0))>0:1,1:0),$O(^%ZIS(1,"C",I,0))>0:1,1:0) S NM=$S(I=47:"MT",I=60:"SDP",1:I)
19ADD I %ZISV]"" S LST=LST+1 G:$D(^%ZIS(1,+LST,0))#2 ADD S T=T+1,^%ZIS(1,"C",I,+LST)="",^%ZIS(1,+LST,0)=%ZISV1_NM_"^"_I_"^1^1^^^^^"_%ZISV_"^^1",^("TYPE")=$S(I=47:"MT",I=60:"SDP",1:"TRM"),^%ZIS(1,"B",%ZISV1_NM,+LST)="" D SETCNTR Q
20ADD1 S LST=LST+1 G:$D(^%ZIS(1,+LST,0))#2 ADD1 S T=T+1,^%ZIS(1,"C",I,+LST)="",^%ZIS(1,+LST,0)=NM_"^"_I_"^1^1"
21 S ^("TYPE")=$S(I=47:"MT",I>58&(I<63):"SDP",TYPE="HFS":"HFS",1:"TRM"),^%ZIS(1,"B",NM,+LST)="",$P(^%ZIS(1,0),"^",3)=+LST,$P(^(0),"^",4)=T Q
22 Q
23SETCNTR S ^%ZIS(1,"CPU",%ZISV_"."_I,+LST)="",^%ZIS(1,"G","SYS."_%ZISV_"."_I,+LST)="",$P(^%ZIS(1,0),"^",3)=+LST,$P(^(0),"^",4)=T Q
24EXIT ;
25 L -^%ZIS K %PC,CONFIG,DEF,LST,M,NAME,NM,T,TTY,TYPE,X
26 Q
27PEND K %,%F,%GBN,%GLB,%MAX,%OF,%UI,%USZ,%UT,%X,CC,GN,I,K,KEY,OF,TFL,TYP,UC
28 Q
29FLST S X=$S($D(^%ZIS(1,0)):$P(^(0),"^",3),1:0),A=+X
30 F I=+X:0 S I=+$O(^%ZIS(1,I)) Q:I'>0 S A=I
31 S LST=A Q
32HLP ;HELP FOR PREFIX QUESTION
33 W !,"There must be a prefix for a new device"
34 W !,"becuase the Device Name and the $I cannot"
35 W !,"be the same." Q
Note: See TracBrowser for help on using the repository browser.