1 | C0CENV ;WV/JMC - CCD/CCR Environment Check/Install Routine; July 21, 2009
|
---|
2 | ;;1.0;C0C;;May 19, 2009;
|
---|
3 | ;
|
---|
4 | ;
|
---|
5 | ENV ; Does not prevent loading of the transport global.
|
---|
6 | ; Environment check is done only during the install.
|
---|
7 | ;
|
---|
8 | N XQA,XQAMSG
|
---|
9 | ;
|
---|
10 | ;
|
---|
11 | ; Make sure the patch name exist
|
---|
12 | ;
|
---|
13 | I '$D(XPDNM) D Q
|
---|
14 | . D BMES("No valid patch name exist")
|
---|
15 | . S XPDQUIT=2
|
---|
16 | . D EXIT
|
---|
17 | ;
|
---|
18 | D CHECK
|
---|
19 | D EXIT
|
---|
20 | Q
|
---|
21 | ;
|
---|
22 | ;
|
---|
23 | CHECK ; Perform environment check
|
---|
24 | ;
|
---|
25 | I $S('$G(IOM):1,'$G(IOSL):1,$G(U)'="^":1,1:0) D
|
---|
26 | . D BMES("Terminal Device is not defined")
|
---|
27 | . S XPDQUIT=2
|
---|
28 | ;
|
---|
29 | I $S('$G(DUZ):1,$D(DUZ)[0:1,$D(DUZ(0))[0:1,1:0) D
|
---|
30 | . D BMES("Please log in to set local DUZ... variables")
|
---|
31 | . S XPDQUIT=2
|
---|
32 | ;
|
---|
33 | I $P($$ACTIVE^XUSER(DUZ),"^")'=1 D
|
---|
34 | . D BMES("You are not a valid user on this system")
|
---|
35 | . S XPDQUIT=2
|
---|
36 | Q
|
---|
37 | ;
|
---|
38 | ;
|
---|
39 | EXIT ;
|
---|
40 | ;
|
---|
41 | ;
|
---|
42 | I $G(XPDQUIT) D BMES("--- Install Environment Check FAILED ---") Q
|
---|
43 | D BMES("--- Environment Check is Ok ---")
|
---|
44 | ;
|
---|
45 | Q
|
---|
46 | ;
|
---|
47 | ;
|
---|
48 | PRE ;Pre-install entry point
|
---|
49 | ;
|
---|
50 | ; No action needed in pre-install
|
---|
51 | D BMES("No action need for pre-install")
|
---|
52 | ;
|
---|
53 | Q
|
---|
54 | ;
|
---|
55 | ;
|
---|
56 | POST ;Post install
|
---|
57 | ;
|
---|
58 | ; Check for RPMS system with V LAB file.
|
---|
59 | ;
|
---|
60 | I $$VFILE^DILFD(9000010.09)'=1 Q
|
---|
61 | ;
|
---|
62 | S %=$$NEWCP^XPDUTL("RPMS1","POST1^C0CENV")
|
---|
63 | S %=$$NEWCP^XPDUTL("RPMS2","POST2^C0CENV")
|
---|
64 | S %=$$NEWCP^XPDUTL("RPMS3","POST3^C0CENV")
|
---|
65 | S %=$$NEWCP^XPDUTL("RPMS4","POST4^C0CENV")
|
---|
66 | S %=$$NEWCP^XPDUTL("RPMS5","POST5^C0CENV")
|
---|
67 | S %=$$NEWCP^XPDUTL("RPMS6","POST6^C0CENV")
|
---|
68 | S %=$$NEWCP^XPDUTL("RPMS7","POST7^C0CENV")
|
---|
69 | ;
|
---|
70 | Q
|
---|
71 | ;
|
---|
72 | ;
|
---|
73 | POST1 ; Checkpoint call back entry point.
|
---|
74 | ; Add new style ALR1 cross-reference to V LAB file.
|
---|
75 | ;
|
---|
76 | N MSG
|
---|
77 | S MSG="Starting installation of ALR1 cross-reference at "_$$HTE^XLFDT($H,"1Z")
|
---|
78 | D BMES(MSG)
|
---|
79 | D ALR1^C0CLA7DD
|
---|
80 | S MSG="Installation of ALR1 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
|
---|
81 | D BMES(MSG)
|
---|
82 | Q
|
---|
83 | ;
|
---|
84 | ;
|
---|
85 | POST2 ; Checkpoint call back entry point.
|
---|
86 | ; Add new style ALR2 cross-reference to V LAB file.
|
---|
87 | ;
|
---|
88 | N MSG
|
---|
89 | S MSG="Starting installation of ALR2 cross-reference at "_$$HTE^XLFDT($H,"1Z")
|
---|
90 | D BMES(MSG)
|
---|
91 | D ALR2^C0CLA7DD
|
---|
92 | S MSG="Installation of ALR2 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
|
---|
93 | D BMES(MSG)
|
---|
94 | Q
|
---|
95 | ;
|
---|
96 | ;
|
---|
97 | POST3 ; Checkpoint call back entry point.
|
---|
98 | ; Add new style ALR3 cross-reference to V LAB file.
|
---|
99 | ;
|
---|
100 | N MSG
|
---|
101 | S MSG="Starting installation of ALR3 cross-reference at "_$$HTE^XLFDT($H,"1Z")
|
---|
102 | D BMES(MSG)
|
---|
103 | D ALR3^C0CLA7DD
|
---|
104 | S MSG="Installation of ALR3 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
|
---|
105 | D BMES(MSG)
|
---|
106 | Q
|
---|
107 | ;
|
---|
108 | ;
|
---|
109 | POST4 ; Checkpoint call back entry point.
|
---|
110 | ; Add new style ALR4 cross-reference to V LAB file.
|
---|
111 | ;
|
---|
112 | N MSG
|
---|
113 | S MSG="Starting installation of ALR4 cross-reference at "_$$HTE^XLFDT($H,"1Z")
|
---|
114 | D BMES(MSG)
|
---|
115 | D ALR4^C0CLA7DD
|
---|
116 | S MSG="Installation of ALR4 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
|
---|
117 | D BMES(MSG)
|
---|
118 | Q
|
---|
119 | ;
|
---|
120 | ;
|
---|
121 | POST5 ; Checkpoint call back entry point.
|
---|
122 | ; Add new style ALR5 cross-reference to V LAB file.
|
---|
123 | ;
|
---|
124 | N MSG
|
---|
125 | S MSG="Starting installation of ALR5 cross-reference at "_$$HTE^XLFDT($H,"1Z")
|
---|
126 | D BMES(MSG)
|
---|
127 | D ALR5^C0CLA7DD
|
---|
128 | S MSG="Installation of ALR5 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
|
---|
129 | D BMES(MSG)
|
---|
130 | Q
|
---|
131 | ;
|
---|
132 | ;
|
---|
133 | POST6 ; Checkpoint call back entry point.
|
---|
134 | ; Check for RPMS system and determine LAB patch level
|
---|
135 | ; and need to load in C0C version of LA7 routines.
|
---|
136 | ;
|
---|
137 | N MSG
|
---|
138 | ;
|
---|
139 | ; Load and rename C0CQRY2 to LA7QRY2 if LA*5.2*69 not installed
|
---|
140 | I '$$PATCH^XPDUTL("LA*5.2*69") D
|
---|
141 | . S MSG="This system missing LAB patch LA*5.2*69"
|
---|
142 | . D BMES(MSG)
|
---|
143 | . S MSG="Renaming routine C0CQRY2 to LA7QRY2"
|
---|
144 | . D BMES(MSG)
|
---|
145 | . D LOAD("C0CQRY2")
|
---|
146 | . D SAVE("C0CQRY2","LA7QRY2")
|
---|
147 | ;
|
---|
148 | ; Load and rename C0CVOBX1 to LA7VOBX1 if LA*5.2*64 not installed.
|
---|
149 | I '$$PATCH^XPDUTL("LA*5.2*64") D
|
---|
150 | . S MSG="This system missing LAB patch LA*5.2*64"
|
---|
151 | . D BMES(MSG)
|
---|
152 | . S MSG="Renaming routine C0CVOBX1 to LA7VOBX1"
|
---|
153 | . D BMES(MSG)
|
---|
154 | . D LOAD("C0CVOBX1")
|
---|
155 | . D SAVE("C0CVOBX1","LA7VOBX1")
|
---|
156 | ;
|
---|
157 | ; Load and rename C0CQRY1 to LA7QRY1 if LA*5.2*68 not installed.
|
---|
158 | I '$$PATCH^XPDUTL("LA*5.2*68") D
|
---|
159 | . S MSG="Renaming routine C0CQRY1 to LA7QRY1"
|
---|
160 | . D BMES(MSG)
|
---|
161 | . D LOAD("C0CQRY1")
|
---|
162 | . D SAVE("C0CQYR1","LA7QRY1")
|
---|
163 | ;
|
---|
164 | Q
|
---|
165 | ;
|
---|
166 | ;
|
---|
167 | POST7 ; Checkpoint call back entry point.
|
---|
168 | ; Task setting the data in the indexes.
|
---|
169 | ;
|
---|
170 | N MSG,ZTDESC,ZTDTH,ZTIO,ZTSK,ZTRTN,ZTSAVE
|
---|
171 | ;
|
---|
172 | ; If TaskMan not running then peform post-intall directly (interactively)
|
---|
173 | I '$$TM^%ZTLOAD D Q
|
---|
174 | . S MSG="TaskMan is not running"
|
---|
175 | . D BMES(MSG)
|
---|
176 | . S MSG="Will run indexing interactively"
|
---|
177 | . D BMES(MSG)
|
---|
178 | . D REINDEX^C0CLA7DD
|
---|
179 | ;
|
---|
180 | ; If KIDS install has been tasked then run post-install during this task.
|
---|
181 | I $D(ZTQUEUED) D REINDEX^C0CLA7DD Q
|
---|
182 | ;
|
---|
183 | S MSG="Tasking setting data into new V LAB indexes"
|
---|
184 | D BMES(MSG)
|
---|
185 | ;
|
---|
186 | S ZTRTN="REINDEX^C0CLA7DD",ZTDESC="C0C post-install - V LAB x-refs indexing"
|
---|
187 | S ZTIO="",ZTDTH=$H,ZTSAVE("XP*")=""
|
---|
188 | D ^%ZTLOAD
|
---|
189 | ;
|
---|
190 | I ZTSK>0 D
|
---|
191 | . S MSG="Task "_ZTSK_" tasked to set data into ALR* cross-references to V LAB file."
|
---|
192 | . D BMES(MSG)
|
---|
193 | E D
|
---|
194 | . S MSG="Tasking of indexing of V LAB file failed"
|
---|
195 | . D BMES(MSG)
|
---|
196 | ;
|
---|
197 | ;
|
---|
198 | Q
|
---|
199 | ;
|
---|
200 | ;
|
---|
201 | BMES(STR) ; Write BMES^XPDUTL statements
|
---|
202 | ;
|
---|
203 | D BMES^XPDUTL($$CJ^XLFSTR(STR,IOM))
|
---|
204 | ;
|
---|
205 | Q
|
---|
206 | ;
|
---|
207 | ;
|
---|
208 | LOAD(X) ; load routine X
|
---|
209 | N %N,DIF,XCNP
|
---|
210 | K ^TMP($J,X)
|
---|
211 | S DIF="^TMP($J,X,",XCNP=0
|
---|
212 | X ^%ZOSF("LOAD")
|
---|
213 | Q
|
---|
214 | ;
|
---|
215 | ;
|
---|
216 | SAVE(OLD,NEW) ; restore routine X
|
---|
217 | N %,DIE,X,XCM,XCN,XCS
|
---|
218 | S DIE="^TMP($J,"_OLD_",",XCN=0,X=NEW
|
---|
219 | X ^%ZOSF("SAVE")
|
---|
220 | Q
|
---|