source: WorldVistAEHR/trunk/r/LIBRARY-LBR-LBRS/LBR258P.m@ 789

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

initial load of WorldVistAEHR

File size: 1.6 KB
RevLine 
[613]1LBR258P ;ALB/MRY - Env/Pre/Post-install of consolidation ;[ 02/08/01 08:21 AM]
2 ;;2.5;Library;**8**;Mar 11, 1996
3 ;
4EN ; Environment check
5 ;
6 I '$G(DUZ)!($G(DUZ(0))'["@") W !,"USER 'DUZ' VARIABLES **NOT** CORRECTLY DEFINED. CONFIRM THAT DUZ(0)='@'. THEN D ^XUP." S XPDQUIT=1 Q
7 ;
8 I $$VERSION^XPDUTL("LBRY")<2.5 S QUIT=0 D G ABRT:QUIT
9 . I $$VERSION^XPDUTL("LBR")>2 Q
10 . W !!,"VERSION 2.5 OF LIBRARY HAS NOT BEEN LOADED",! S QUIT=1
11 D BMES^XPDUTL(">> Environment check complete and okay.")
12 ;
13 K QUIT Q
14 ;
15POST ; Post-install
16 ; Beta sites who installed a previous version of LBR*8. Otherwise, quit.
17 ;
18 D BMES^XPDUTL(">> Running Post-install...")
19 D MES^XPDUTL(" ...Cleaning up version numbers.")
20 ;
21 ; Clean up version number
22 S N=679.9999 F S N=$O(^DD(N)) Q:N>689.4 I $$GET1^DID(N,"","","VERSION")?1"2.5"1A.N S ^DD(N,0,"VR")=2.5
23 ;
24 G POST2 ; After V7
25 ;
26 ; Delete fields (#40/#41 of File #682.1) previously install from
27 ; patch *8 in beta sites. These fields are not used.
28 ;
29 ; Quit if a field isn't found at site.
30 I $$GET1^DID(682.1,41,"","LABEL")="" G POST2
31 D MES^XPDUTL(" ...Removing from File (#682.1) fields #40, #41 and its data.")
32 ;
33 ; Delete data
34 N LBRN
35 S LBRN=0
36 F S LBRN=$O(^LBRY(682.1,LBRN)) Q:'LBRN D
37 . S DIE="^LBRY(682.1,",DA=LBRN,DR="40///@" D ^DIE
38 . ; If data exists for field #41 (12th node), then delete.
39 . I $D(^LBRY(682.1,DA,12,0)) D
40 . . S DIE="^LBRY(682.1,",DA=LBRN,DR="41///@" D ^DIE
41 K DIE,DA,DR
42 ;
43 ; Remove DD fields
44 S DIK="^DD(682.1,",DA=40,DA(1)=682.1 D ^DIK
45 S DIK="^DD(682.1,",DA=41,DA(1)=682.1 D ^DIK
46 K DIK,DA
47 ;
48POST2 D BMES^XPDUTL(">> Post-install complete.")
49 G EXIT
50ABRT S XPDQUIT=1 Q
51EXIT K QUIT,LBRN D CLEAN^DILF
52 Q
Note: See TracBrowser for help on using the repository browser.