source: ccr/trunk/p/C0CENV.m@ 1742

Last change on this file since 1742 was 1586, checked in by Sam Habiel, 12 years ago

Changed license to AGPL. Some clean-up for XINDEX

  • Property svn:mergeinfo set to (toggle deleted branches)
    /ccr/branches/ohum/o-old/p/C0CENV.m1290
    /ccr/branches/ohum/p/C0CENV.m1291-1543
    /ccr/branches/ohum/p/p/C0CENV.m1287-1289
File size: 5.1 KB
Line 
1C0CENV ;WV/JMC - CCD/CCR Environment Check/Install Routine ; Aug 16, 2009
2 ;;1.2;CCD/CCR GENERATION UTILITIES;;Oct 30, 2012;Build 50
3 ;
4 ; (C) John McCormack 2009
5 ;
6 ; This program is free software: you can redistribute it and/or modify
7 ; it under the terms of the GNU Affero General Public License as
8 ; published by the Free Software Foundation, either version 3 of the
9 ; License, or (at your option) any later version.
10 ;
11 ; This program is distributed in the hope that it will be useful,
12 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ; GNU Affero General Public License for more details.
15 ;
16 ; You should have received a copy of the GNU Affero General Public License
17 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
18 ;
19 ;
20ENV ; Does not prevent loading of the transport global.
21 ; Environment check is done only during the install.
22 ;
23 N XQA,XQAMSG
24 ;
25 ;
26 ; Make sure the patch name exist
27 ;
28 I '$D(XPDNM) D Q
29 . D BMES("No valid patch name exist")
30 . S XPDQUIT=2
31 . D EXIT
32 ;
33 D CHECK
34 D EXIT
35 Q
36 ;
37 ;
38CHECK ; Perform environment check
39 ;
40 I $S('$G(IOM):1,'$G(IOSL):1,$G(U)'="^":1,1:0) D
41 . D BMES("Terminal Device is not defined")
42 . S XPDQUIT=2
43 ;
44 I $S('$G(DUZ):1,$D(DUZ)[0:1,$D(DUZ(0))[0:1,1:0) D
45 . D BMES("Please log in to set local DUZ... variables")
46 . S XPDQUIT=2
47 ;
48 I $P($$ACTIVE^XUSER(DUZ),"^")'=1 D
49 . D BMES("You are not a valid user on this system")
50 . S XPDQUIT=2
51 Q
52 ;
53 ;
54EXIT ;
55 ;
56 ;
57 I $G(XPDQUIT) D BMES("--- Install Environment Check FAILED ---") Q
58 D BMES("--- Environment Check is Ok ---")
59 ;
60 Q
61 ;
62 ;
63PRE ;Pre-install entry point
64 ;
65 ; No action needed in pre-install
66 D BMES("No action need for pre-install")
67 ;
68 Q
69 ;
70 ;
71POST ;Post install
72 ;
73 ; Check for RPMS system with V LAB file.
74 ;
75 I $$VFILE^DILFD(9000010.09)'=1 Q
76 ;
77 S %=$$NEWCP^XPDUTL("RPMS1","POST1^C0CENV")
78 S %=$$NEWCP^XPDUTL("RPMS2","POST2^C0CENV")
79 S %=$$NEWCP^XPDUTL("RPMS3","POST3^C0CENV")
80 S %=$$NEWCP^XPDUTL("RPMS4","POST4^C0CENV")
81 S %=$$NEWCP^XPDUTL("RPMS5","POST5^C0CENV")
82 S %=$$NEWCP^XPDUTL("RPMS6","POST6^C0CENV")
83 S %=$$NEWCP^XPDUTL("RPMS7","POST7^C0CENV")
84 ;
85 Q
86 ;
87 ;
88POST1 ; Checkpoint call back entry point.
89 ; Add new style ALR1 cross-reference to V LAB file.
90 ;
91 N MSG
92 S MSG="Starting installation of ALR1 cross-reference at "_$$HTE^XLFDT($H,"1Z")
93 D BMES(MSG)
94 D ALR1^C0CLA7DD
95 S MSG="Installation of ALR1 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
96 D BMES(MSG)
97 Q
98 ;
99 ;
100POST2 ; Checkpoint call back entry point.
101 ; Add new style ALR2 cross-reference to V LAB file.
102 ;
103 N MSG
104 S MSG="Starting installation of ALR2 cross-reference at "_$$HTE^XLFDT($H,"1Z")
105 D BMES(MSG)
106 D ALR2^C0CLA7DD
107 S MSG="Installation of ALR2 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
108 D BMES(MSG)
109 Q
110 ;
111 ;
112POST3 ; Checkpoint call back entry point.
113 ; Add new style ALR3 cross-reference to V LAB file.
114 ;
115 N MSG
116 S MSG="Starting installation of ALR3 cross-reference at "_$$HTE^XLFDT($H,"1Z")
117 D BMES(MSG)
118 D ALR3^C0CLA7DD
119 S MSG="Installation of ALR3 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
120 D BMES(MSG)
121 Q
122 ;
123 ;
124POST4 ; Checkpoint call back entry point.
125 ; Add new style ALR4 cross-reference to V LAB file.
126 ;
127 N MSG
128 S MSG="Starting installation of ALR4 cross-reference at "_$$HTE^XLFDT($H,"1Z")
129 D BMES(MSG)
130 D ALR4^C0CLA7DD
131 S MSG="Installation of ALR4 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
132 D BMES(MSG)
133 Q
134 ;
135 ;
136POST5 ; Checkpoint call back entry point.
137 ; Add new style ALR5 cross-reference to V LAB file.
138 ;
139 N MSG
140 S MSG="Starting installation of ALR5 cross-reference at "_$$HTE^XLFDT($H,"1Z")
141 D BMES(MSG)
142 D ALR5^C0CLA7DD
143 S MSG="Installation of ALR5 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
144 D BMES(MSG)
145 Q
146 ;
147 ;
148POST6 ; Checkpoint call back entry point.
149 ; Check for RPMS system and determine LAB patch level
150 ; and need to load in C0C version of LA7 routines.
151 ;
152 N MSG
153 ;
154 ; Load and rename C0CQRY2 to LA7QRY2 if LA*5.2*69 not installed
155 I '$$PATCH^XPDUTL("LA*5.2*69") D
156 . S MSG="This system missing LAB patch LA*5.2*69"
157 . D BMES(MSG)
158 . S MSG="Renaming routine C0CQRY2 to LA7QRY2"
159 . D BMES(MSG)
160 . D LOAD("C0CQRY2")
161 . D SAVE("C0CQRY2","LA7QRY2")
162 ;
163 ; Load and rename C0CVOBX1 to LA7VOBX1 if LA*5.2*64 not installed.
164 I '$$PATCH^XPDUTL("LA*5.2*64") D
165 . S MSG="This system missing LAB patch LA*5.2*64"
166 . D BMES(MSG)
167 . S MSG="Renaming routine C0CVOBX1 to LA7VOBX1"
168 . D BMES(MSG)
169 . D LOAD("C0CVOBX1")
170 . D SAVE("C0CVOBX1","LA7VOBX1")
171 ;
172 ; Load and rename C0CQRY1 to LA7QRY1 if LA*5.2*68 not installed.
173 I '$$PATCH^XPDUTL("LA*5.2*68") D
174 . S MSG="This system missing LAB patch LA*5.2*68"
175 . D BMES(MSG)
176 . S MSG="Renaming routine C0CQRY1 to LA7QRY1"
177 . D BMES(MSG)
178 . D LOAD("C0CQRY1")
179 . D SAVE("C0CQRY1","LA7QRY1")
180 ;
181 Q
182 ;
183 ;
184POST7 ; Checkpoint call back entry point.
185 ;
186 D REINDEX^C0CLA7DD
187 ;
188 Q
189 ;
190 ;
191BMES(STR) ; Write BMES^XPDUTL statements
192 ;
193 D BMES^XPDUTL($$CJ^XLFSTR(STR,IOM))
194 ;
195 Q
196 ;
197 ;
198LOAD(X) ; load routine X
199 N %N,DIF,XCNP
200 K ^TMP($J,X)
201 S DIF="^TMP($J,X,",XCNP=0
202 X ^%ZOSF("LOAD")
203 Q
204 ;
205 ;
206SAVE(OLD,NEW) ; restore routine X
207 N %,DIE,X,XCM,XCN,XCS
208 S DIE="^TMP($J,"""_OLD_""",",XCN=0,X=NEW
209 X ^%ZOSF("SAVE")
210 Q
Note: See TracBrowser for help on using the repository browser.