1 | ZTMGRSET ;SF/RWF,PUG/TOAD - SET UP THE MGR ACCOUNT FOR THE SYSTEM ;02/22/2006
|
---|
2 | ;;8.0;KERNEL;**34,36,69,94,121,127,136,191,275,355**;JUL 10, 1995;Build 9
|
---|
3 | ;
|
---|
4 | N %D,%S,I,OSMAX,U,X,X1,X2,Y,Z1,Z2,ZTOS,ZTMODE,SCR
|
---|
5 | S ZTMODE=0
|
---|
6 | A W !!,"ZTMGRSET Version ",$P($T(+2),";",3)," Patch level ",$P($T(+2),";",5)
|
---|
7 | W !,"HELLO! I exist to assist you in correctly initializing the current account."
|
---|
8 | I $D(^%ZOSF("UCI")) X ^%ZOSF("UCI") D G A:"YNyn"'[$E(X) Q:"Nn"[$E(X)
|
---|
9 | . W $C(7),!!,"This is namespace or uci ",Y,".",!
|
---|
10 | . R "Should I continue? N//",X:120
|
---|
11 | . Q
|
---|
12 | S ZTOS=$$OS() I ZTOS'>0 W !,"OS type not selected. Exiting ZTMGRSET." Q
|
---|
13 | I ZTMODE D I (PCNM<1)!(PCNM>999) W !,"Need a Patch number to load." Q
|
---|
14 | . R !!,"Patch number to load: ",PCNM:120 Q:(PCNM<1)!(PCNM>999)
|
---|
15 | . S SCR="I $P($T(+2^@X),"";"",5)?.E1P1"_$C(34)_PCNM_$C(34)_"1P.E"
|
---|
16 | ;
|
---|
17 | K ^%ZOSF("MASTER"),^("SIGNOFF") ;Remove old nodes.
|
---|
18 | ;
|
---|
19 | DOIT W !!,"I will now rename a group of routines specific to your operating system."
|
---|
20 | D @ZTOS,ALL,GLOBALS:'ZTMODE W !,"ALL DONE"
|
---|
21 | Q
|
---|
22 | ;========================================
|
---|
23 | RELOAD ;Reload any patched routines
|
---|
24 | N %D,%S,I,OSMAX,U,X,X1,X2,Y,Z1,Z2,ZTOS,ZTMODE,SCR
|
---|
25 | S ZTMODE=1 G A
|
---|
26 | Q
|
---|
27 | ;
|
---|
28 | OS() ;Select the OS
|
---|
29 | N Y,X1,X
|
---|
30 | S U="^",SCR="I 1" F I=1:1:20 S X=$T(@I) Q:X="" S OSMAX=I
|
---|
31 | B S Y=0,ZTOS=0 I $D(^%ZOSF("OS")) D
|
---|
32 | . S X1=$P(^%ZOSF("OS"),U),ZTOS=$$OSNUM W !,"I think you are using ",X1
|
---|
33 | W !,"Which MUMPS system should I install?",!
|
---|
34 | F I=1:1:OSMAX W !,I," = ",$P($T(@I),";",3)
|
---|
35 | W !,"System: " W:ZTOS ZTOS,"//"
|
---|
36 | R X:300 S:X="" X=ZTOS
|
---|
37 | I X<1!(X>OSMAX) W !,"NOT A VALID CHOICE" Q:X[U 0 G B
|
---|
38 | Q X
|
---|
39 | ;
|
---|
40 | OSNUM() ;Return the OS number
|
---|
41 | N I,X1,X2,Y S Y=0,X1=$P($G(^%ZOSF("OS")),"^")
|
---|
42 | F I=1:1 S X2=$T(@I) Q:X2="" I X2[X1 S Y=I Q
|
---|
43 | Q Y
|
---|
44 | ;
|
---|
45 | ALL W !!,"Now to load routines common to all systems."
|
---|
46 | D TM,ETRAP,DEV,OTHER,FM
|
---|
47 | I ZTOS=7!(ZTOS=8) D
|
---|
48 | . S ^%ZE="D ^ZE"
|
---|
49 | E D ;With ZLoad, ZSave, ZInsert
|
---|
50 | . W !,"Installing ^%Z editor"
|
---|
51 | . D ^ZTEDIT
|
---|
52 | I 'ZTMODE W !,"Setting ^%ZIS('C')" K ^%ZIS("C") S ^%ZIS("C")="G ^%ZISC"
|
---|
53 | Q
|
---|
54 | ;
|
---|
55 | TM ;Taskman
|
---|
56 | S %S="ZTLOAD^ZTLOAD1^ZTLOAD2^ZTLOAD3^ZTLOAD4^ZTLOAD5^ZTLOAD6^ZTLOAD7"
|
---|
57 | S %D="%ZTLOAD^%ZTLOAD1^%ZTLOAD2^%ZTLOAD3^%ZTLOAD4^%ZTLOAD5^%ZTLOAD6^%ZTLOAD7"
|
---|
58 | D MOVE
|
---|
59 | S %S="ZTM^ZTM0^ZTM1^ZTM2^ZTM3^ZTM4^ZTM5^ZTM6"
|
---|
60 | S %D="%ZTM^%ZTM0^%ZTM1^%ZTM2^%ZTM3^%ZTM4^%ZTM5^%ZTM6"
|
---|
61 | D MOVE
|
---|
62 | S %S="ZTMS^ZTMS0^ZTMS1^ZTMS2^ZTMS3^ZTMS4^ZTMS5^ZTMS7^ZTMSH"
|
---|
63 | ;I ZTOS=7!(ZTOS=8) S $P(%S,U,1)="ZTMSGTM"
|
---|
64 | S %D="%ZTMS^%ZTMS0^%ZTMS1^%ZTMS2^%ZTMS3^%ZTMS4^%ZTMS5^%ZTMS7^%ZTMSH"
|
---|
65 | D MOVE
|
---|
66 | Q
|
---|
67 | FM ;Rename the FileMan routines
|
---|
68 | I ZTMODE=1 Q ;Only ask on full install
|
---|
69 | R !,"Want to rename the FileMan routines: No//",X:600 Q:"Yy"'[$E(X_"N")
|
---|
70 | S %S="DIDT^DIDTC^DIRCR",%D="%DT^%DTC^%RCR"
|
---|
71 | D MOVE
|
---|
72 | Q
|
---|
73 | ;
|
---|
74 | ETRAP ;Error Trap
|
---|
75 | S %S="ZTER^ZTER1",%D="%ZTER^%ZTER1"
|
---|
76 | D MOVE
|
---|
77 | Q
|
---|
78 | OTHER S %S="ZTPP^ZTP1^ZTPTCH^ZTRDEL^ZTMOVE"
|
---|
79 | S %D="%ZTPP^%ZTP1^%ZTPTCH^%ZTRDEL^%ZTMOVE"
|
---|
80 | D MOVE
|
---|
81 | Q
|
---|
82 | DEV S %S="ZIS^ZIS1^ZIS2^ZIS3^ZIS5^ZIS6^ZIS7^ZISC^ZISP^ZISS^ZISS1^ZISS2^ZISTCP^ZISUTL"
|
---|
83 | S %D="%ZIS^%ZIS1^%ZIS2^%ZIS3^%ZIS5^%ZIS6^%ZIS7^%ZISC^%ZISP^%ZISS^%ZISS1^%ZISS2^%ZISTCP^%ZISUTL"
|
---|
84 | D MOVE
|
---|
85 | Q
|
---|
86 | RUM ;Build the routines for Capacity Management (CM)
|
---|
87 | S %S=""
|
---|
88 | I ZTOS=1 S %S="ZOSVKRV^ZOSVKSVE^ZOSVKSVS^ZOSVKSD" ;DSM
|
---|
89 | I ZTOS=2 S %S="ZOSVKRM^ZOSVKSME^ZOSVKSMS^ZOSVKSD" ;MSM
|
---|
90 | I ZTOS=3 S %S="ZOSVKRO^ZOSVKSOE^ZOSVKSOS^ZOSVKSD" ;OpenM
|
---|
91 | I ZTOS=7!(ZTOS=8) S %S="ZOSVKRG^ZOSVKSGE^ZOSVKSGS^ZOSVKSD" ;GT.M
|
---|
92 | S %D="%ZOSVKR^%ZOSVKSE^%ZOSVKSS^%ZOSVKSD"
|
---|
93 | D MOVE
|
---|
94 | Q
|
---|
95 | ZOSF(X) ;
|
---|
96 | X SCR I $T W ! D @(U_X) W !
|
---|
97 | Q
|
---|
98 | 1 ;;VAX DSM(V6), VAX DSM(V7)
|
---|
99 | S %S="ZOSVVXD^ZTBKCVXD^ZIS4VXD^ZISFVXD^ZISHVXD^XUCIVXD^ZISETVXD"
|
---|
100 | D DES,MOVE
|
---|
101 | S %S="ZOSV2VXD^ZTMDCL",%D="%ZOSV2^%ZTMDCL"
|
---|
102 | D MOVE,RUM,ZOSF("ZOSFVXD")
|
---|
103 | Q
|
---|
104 | 2 ;;MSM-PC/PLUS, MSM for NT or UNIX
|
---|
105 | W !,"- Use autostart to do ZTMB don't resave as STUSER."
|
---|
106 | S %S="ZOSVMSM^ZTBKCMSM^ZIS4MSM^ZISFMSM^ZISHMSM^XUCIMSM^ZISETMSM"
|
---|
107 | D DES,MOVE
|
---|
108 | S %S="ZOSV2MSM",%D="%ZOSV2"
|
---|
109 | D MOVE,RUM,ZOSF("ZOSFMSM")
|
---|
110 | I $$VERSION^%ZOSV(1)["UNIX" S %S="ZISHMSU",%D="%ZISH" D MOVE
|
---|
111 | Q
|
---|
112 | 3 ;;Cache (VMS, NT, Linux), OpenM-NT
|
---|
113 | S %S="ZOSVONT^^ZIS4ONT^ZISFONT^ZISHONT^XUCIONT"
|
---|
114 | D DES,MOVE
|
---|
115 | S %S="ZISTCPS^ZTMDCL",%D="%ZISTCPS^%ZTMDCL"
|
---|
116 | D MOVE,RUM,ZOSF("ZOSFONT")
|
---|
117 | Q
|
---|
118 | 4 ;;Datatree, DTM-PC, DT-MAX
|
---|
119 | S %S="ZOSVDTM^ZTBKCDTM^ZIS4DTM^ZISFDTM^ZISHDTM^XUCIDTM^ZISETDTM"
|
---|
120 | D DES,MOVE
|
---|
121 | S %S="ZOSV1DTM^ZTMB",%D="%ZOSV1^%ustart"
|
---|
122 | D MOVE,ZOSF("ZOSFDTM")
|
---|
123 | Q
|
---|
124 | 5 ;;
|
---|
125 | 6 ;;
|
---|
126 | 7 ;;GT.M (VMS)
|
---|
127 | S %ZE=".M" D init^%RSEL
|
---|
128 | S %S="ZOSVGTM^^ZIS4GTM^ZISFGTM^ZISHGTM^XUCIGTM^ZISETGTM"
|
---|
129 | D DES,MOVE
|
---|
130 | S %S="ZOSV2GTM^ZISTCPS^ZTMDCL",%D="%ZOSV2^%ZISTCPS^ZTMDCL"
|
---|
131 | D MOVE,ZOSF("ZOSFGTM")
|
---|
132 | Q
|
---|
133 | 8 ;;GT.M (Unix)
|
---|
134 | S %ZE=".m" D init^%RSEL
|
---|
135 | S %S="ZOSVGUX^^ZIS4GTM^ZISFGTM^ZISHGTM^XUCIGTM^ZISETGUX"
|
---|
136 | D DES,MOVE
|
---|
137 | S %S="ZOSV2GTM^ZISTCPS",%D="%ZOSV2^%ZISTCPS"
|
---|
138 | D MOVE,ZOSF("ZOSFGUX")
|
---|
139 | Q
|
---|
140 | 10 ;;NOT SUPPORTED
|
---|
141 | Q
|
---|
142 | MOVE ; rename % routines
|
---|
143 | N %,X,Y
|
---|
144 | F %=1:1:$L(%D,"^") D
|
---|
145 | . S X=$P(%S,U,%) ; from
|
---|
146 | . S Y=$P(%D,U,%) ; to
|
---|
147 | . W !,"Routine: ",X
|
---|
148 | . Q:X="" Q:Y="" I $T(^@X)="" W ?20," Missing" Q
|
---|
149 | . X SCR Q:'$T
|
---|
150 | . W ?20," Loaded, "
|
---|
151 | . D COPY(X,Y)
|
---|
152 | . W ?20,"Saved as ",Y
|
---|
153 | Q
|
---|
154 | ;
|
---|
155 | COPY(FROM,TO) ;
|
---|
156 | I ZTOS'=7,ZTOS'=8 X "ZL @FROM ZS @TO" Q
|
---|
157 | ;For GT.M below
|
---|
158 | N PATH,COPY,CMD S PATH=$$R
|
---|
159 | S FROM=PATH_FROM_".m"
|
---|
160 | S TO=PATH_$TR(TO,"%","_")_".m"
|
---|
161 | S COPY=$S(ZTOS=7:"COPY",1:"cp")
|
---|
162 | S CMD=COPY_" "_FROM_" "_TO
|
---|
163 | X "ZSYSTEM CMD"
|
---|
164 | Q
|
---|
165 | ;
|
---|
166 | R() ; routine directory for GT.M
|
---|
167 | Q d(1) ;
|
---|
168 | I ZTOS=7 Q $P($ZRO,",")
|
---|
169 | I ZTOS=8 Q $P($S($ZRO["(":$P($P($ZRO,"(",2),")"),1:$ZRO)," ")_"/"
|
---|
170 | E Q ""
|
---|
171 | ;
|
---|
172 | DES S %D="%ZOSV^%ZTBKC1^%ZIS4^%ZISF^%ZISH^%XUCI^ZISETUP" Q
|
---|
173 | ;
|
---|
174 | GLOBALS ;Set node zero of file #3.05 & #3.07
|
---|
175 | W !!,"Now, I will check your % globals."
|
---|
176 | W ".........."
|
---|
177 | F %="^%ZIS","^%ZISL","^%ZTER","^%ZUA" S:'$D(@%) @%=""
|
---|
178 | S:$D(^%ZTSK(0))[0 ^%ZTSK(-1)=100,^%ZTSCH=""
|
---|
179 | S Z1=$G(^%ZTSK(-1),-1),Z2=$G(^%ZTSK(0))
|
---|
180 | I Z1'=$P(Z2,"^",3) S:Z1'>0 ^%ZTSK(-1)=+Z2 S ^%ZTSK(0)="TASK'S^14.4^"_^%ZTSK(-1)
|
---|
181 | S:$D(^%ZUA(3.05,0))[0 ^%ZUA(3.05,0)="FAILED ACCESS ATTEMPTS LOG^3.05^^"
|
---|
182 | S:$D(^%ZUA(3.07,0))[0 ^%ZUA(3.07,0)="PROGRAMMER MODE LOG^3.07^^"
|
---|
183 | Q
|
---|
184 | NAME ;Setup the static names for this system
|
---|
185 | MGR W !,"NAME OF MANAGER'S UCI,VOLUME SET: "_^%ZOSF("MGR")_"// " R X:$S($G(DTIME):DTIME,1:9999) I X]"" X ^("UCICHECK") G MGR:0[Y S ^%ZOSF("MGR")=X
|
---|
186 | PROD W !,"PRODUCTION (SIGN-ON) UCI,VOLUME SET: "_^%ZOSF("PROD")_"// " R X:$S($G(DTIME):DTIME,1:9999) I X]"" X ^("UCICHECK") G PROD:0[Y S ^%ZOSF("PROD")=X
|
---|
187 | VOL W !,"NAME OF VOLUME SET: "_^%ZOSF("VOL")_"//" R X:$S($G(DTIME):DTIME,1:9999) I X]"" S:X?3U ^%ZOSF("VOL")=X I X'?3U W "MUST BE 3 Upper case." G VOL
|
---|
188 | W ! Q
|
---|