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/ZTMGRSET.m@ 668

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

WorldVistAEHR overlayed on FOIAVistA

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