1 | C0CENV ;WV/JMC - CCD/CCR Environment Check/Install Routine ; Aug 16, 2009
|
---|
2 | ;;1.2;C0C;;May 11, 2012;Build 46
|
---|
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="This system missing LAB patch LA*5.2*68"
|
---|
160 | . D BMES(MSG)
|
---|
161 | . S MSG="Renaming routine C0CQRY1 to LA7QRY1"
|
---|
162 | . D BMES(MSG)
|
---|
163 | . D LOAD("C0CQRY1")
|
---|
164 | . D SAVE("C0CQRY1","LA7QRY1")
|
---|
165 | ;
|
---|
166 | Q
|
---|
167 | ;
|
---|
168 | ;
|
---|
169 | POST7 ; Checkpoint call back entry point.
|
---|
170 | ;
|
---|
171 | D REINDEX^C0CLA7DD
|
---|
172 | ;
|
---|
173 | Q
|
---|
174 | ;
|
---|
175 | ;
|
---|
176 | BMES(STR) ; Write BMES^XPDUTL statements
|
---|
177 | ;
|
---|
178 | D BMES^XPDUTL($$CJ^XLFSTR(STR,IOM))
|
---|
179 | ;
|
---|
180 | Q
|
---|
181 | ;
|
---|
182 | ;
|
---|
183 | LOAD(X) ; load routine X
|
---|
184 | N %N,DIF,XCNP
|
---|
185 | K ^TMP($J,X)
|
---|
186 | S DIF="^TMP($J,X,",XCNP=0
|
---|
187 | X ^%ZOSF("LOAD")
|
---|
188 | Q
|
---|
189 | ;
|
---|
190 | ;
|
---|
191 | SAVE(OLD,NEW) ; restore routine X
|
---|
192 | N %,DIE,X,XCM,XCN,XCS
|
---|
193 | S DIE="^TMP($J,"""_OLD_""",",XCN=0,X=NEW
|
---|
194 | X ^%ZOSF("SAVE")
|
---|
195 | Q
|
---|