source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRC5INST.m@ 613

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

initial load of WorldVistAEHR

File size: 3.2 KB
Line 
1PRC5INST ;WISC/RFJ-version 5 IFCAP installation main program ;30 Jun 94
2 ;;5.0;IFCAP;;4/21/95
3 ;
4 N %,%H,%I,DA,DIC,DIE,DIK,DR,PRC5INS1,PRC5INS2,PRC5PRC,PRC5PRCP,PRC5STRT,PRCEND,PRCINSTL,PRCNAME,PRCPFLAG,PRCSTART,PRCTEXT,PRCVERS,X,Y
5 ;
6 D NOW^%DTC S PRC5STRT=%
7 ; prcvers used to check version number
8 ; prc5inst used in environmental check
9 S PRCVERS=$P($T(PRC5INST+1),";",3),PRC5INST=1
10 ;
11 ; display introduction
12 W !!,"=================== *** IFCAP INSTALLATION INTRODUCTION *** ==================="
13 W !,"|",?78,"|"
14 W !,"| Before running this program, please make sure you do not have users",?78,"|"
15 W !,"| on the system. Also, please make sure you have a working backup of",?78,"|"
16 W !,"| your system disks.",?78,"|"
17 S %="",$P(%,"-",80)="" W !,%
18 ;
19 ; run environmental check routine
20 D ^PRC5INS1 I '$G(PRC5INST) Q
21 D EN^PRC5C I '$D(PRC5INST) Q
22 ;
23 ; check called routines and last ifcap routine
24 S PRCPFLAG=0 I $D(^%ZOSF("TEST")) F X="PRC5INS1","PRCPUYN","PRCPUX2","PRCPXTRM","PRCPINIT","PRCINIT","PRCTRED" X ^%ZOSF("TEST") I '$T S PRCPFLAG=1 Q
25 I PRCPFLAG K X S X(1)="It does not look like all of the IFCAP Version "_PRCVERS_" routines have been successfully loaded. Please re-load the routines and run this program again." D DISPLAY^PRCPUX2(1,78,.X) Q
26 ;
27 ; find last version loaded
28 S (DA,X)=0 F S DA=$O(^DIC(9.4,"C","PRC",DA)) Q:'DA S %=$G(^DIC(9.4,DA,"VERSION")) I %>X S PRC5PRC=DA_"^"_%,X=%
29 I X,X'>3.9999 K X S X(1)="YOU MUST BE RUNNING IFCAP VERSION 4.0 OR GREATER BEFORE INSTALLING VERSION "_PRCVERS_"." D DISPLAY^PRCPUX2(1,78,.X) Q
30 S (DA,X)=0 F S DA=$O(^DIC(9.4,"C","PRCP",DA)) Q:'DA S %=$G(^DIC(9.4,DA,"VERSION")) I %>X S PRC5PRCP=DA_"^"_%,X=%
31 ;
32 W !!,"================== *** IFCAP INSTALLATION INITIALIZATION *** =================="
33 W !,"The installation of IFCAP Version ",PRCVERS," has two parts to it as follows:"
34 S PRC5INS1=$G(^DIC(9.4,+$G(PRC5PRCP),22,+$O(^DIC(9.4,+$G(PRC5PRCP),22,"B",PRCVERS,0)),0)),Y=$P(PRC5INS1,"^",3) I Y D DD^%DT S $P(PRC5INS1,"^",3)=Y
35 S PRC5INS2=$G(^DIC(9.4,+$G(PRC5PRC),22,+$O(^DIC(9.4,+$G(PRC5PRC),22,"B",PRCVERS,0)),0)),Y=$P(PRC5INS2,"^",3) I Y D DD^%DT S $P(PRC5INS2,"^",3)=Y
36 S PRCTEXT(10,0)="PART 1: Generic Inventory Package "_$S($P(PRC5INS1,"^",3)'="":"previously installed "_$P(PRC5INS1,"^",3),1:"NOT INSTALLED") W !," ",PRCTEXT(10,0)
37 S PRCTEXT(11,0)="PART 2: IFCAP Main System "_$S($P(PRC5INS2,"^",3)'="":"previously installed "_$P(PRC5INS2,"^",3),1:"NOT INSTALLED") W !," ",PRCTEXT(11,0)
38 ;
39 W ! S XP="ARE YOU SURE YOU WANT TO START/CONTINUE THE INSTALLATION OF IFCAP",XH="Enter 'YES' to install IFCAP, 'NO' or '^' to exit." I $$YN^PRCPUYN(2)'=1 Q
40 ;
41 ; clean up package file
42 W !!,"======================= *** CLEANING UP PACKAGE FILE *** ======================"
43 ; clean out old prc entries
44 S PRCNAME="PR" F S PRCNAME=$O(^DIC(9.4,"C",PRCNAME)) Q:PRCNAME=""!($E(PRCNAME,1,2)'="PR") D
45 . I PRCNAME="PRCA" Q
46 . I $E(PRCNAME,1,3)'="PRC",$E(PRCNAME,1,3)'="PRX" Q
47 . S DA=0 F S DA=$O(^DIC(9.4,"C",PRCNAME,DA)) Q:'DA I DA'=+$G(PRC5PRC),DA'=+$G(PRC5PRCP) W !?5,PRCNAME," (internal entry #",DA,") ..." S DIK="^DIC(9.4," D ^DIK W " deleted."
48 ; reset name if wrong
49 I $G(PRC5PRC),$D(^DIC(9.4,+PRC5PRC,0)),$P(^(0),"^")'="IFCAP" S DIE="^DIC(9.4,",DA=+PRC5PRC,DR=".01///IFCAP" D ^DIE
50 ;
51 D CONTINUE^PRC5INS1
52 Q
Note: See TracBrowser for help on using the repository browser.