1 | PRC5INS1 ;WISC/RFJ-version 5 IFCAP installation continued ; 29 Jun 94
|
---|
2 | ;;5.0;IFCAP;;4/21/95
|
---|
3 | ; environmental check for variable prc5inst
|
---|
4 | I '$G(PRC5INST) K DIFQ Q
|
---|
5 | I '$G(DUZ)!($G(DUZ(0))'["@") D ERROR("USER 'DUZ' VARIABLES **NOT** CORRECTLY DEFINED.") Q
|
---|
6 | I +$$VERSION^XPDUTL("GEC")<2 D ERROR("GENERIC CODE SHEETS VERSION 2 NEEDS TO BE INSTALLED FIRST.") Q
|
---|
7 | I +$$VERSION^XPDUTL("DG")<5.3 D ERROR("PIMS VERSION 5.3 NEEDS TO BE INSTALLED FIRST.") Q
|
---|
8 | I +$$VERSION^XPDUTL("OR")<2.5 D ERROR("ORDER ENTRY VERSION 2.5 NEEDS TO BE INSTALLED FIRST.") Q
|
---|
9 | I +$$VERSION^XPDUTL("VALM")<1 D ERROR("LIST MANAGER VERSION 1 NEEDS TO BE INSTALLED FIRST.") Q
|
---|
10 | Q
|
---|
11 | ;
|
---|
12 | ;
|
---|
13 | ERROR(MSG) ; do not allow installation of package
|
---|
14 | W !!,"PLEASE FOLLOW INSTALLATION INSTRUCTIONS EXACTLY.",!,MSG
|
---|
15 | K DIFQ,PRC5INST
|
---|
16 | Q
|
---|
17 | ;
|
---|
18 | ;
|
---|
19 | CONTINUE ; continue with installation of version 5
|
---|
20 | W !!,"==================== *** STARTING IFCAP INSTALLATION *** ===================="
|
---|
21 | ; install part 1, inventory
|
---|
22 | W !,"|",?78,"|",!,"|",?30,"----- PART 1 -----",?78,"|"
|
---|
23 | W !,"PART 1: INSTALLING Generic Inventory Package ..."
|
---|
24 | S (PRCPFLAG,PRCINSTL)=0
|
---|
25 | I $P(PRC5INS1,"^",3)'="" D I PRCPFLAG Q
|
---|
26 | . S XP=" THIS PART HAS ALREADY BEEN INSTALLED. DO YOU WANT TO RE-INSTALL IT",XH=" ENTER 'YES' TO RE-INSTALL THE PART, 'NO' TO GO TO THE NEXT PART, '^' TO EXIT." S %=$$YN^PRCPUYN I %=2 S PRCINSTL=1 Q
|
---|
27 | . I %'=1 S PRCPFLAG=1 Q
|
---|
28 | I 'PRCINSTL D
|
---|
29 | . D NOW^%DTC S Y=% D DD^%DT S PRCSTART=$J(Y,20) W ! D ^PRCPINIT
|
---|
30 | . D NOW^%DTC S Y=% D DD^%DT S PRCEND=$J(Y,20)
|
---|
31 | . S PRCTEXT(10,0)="PART 1: Generic Inventory Package "_PRCSTART_" "_PRCEND
|
---|
32 | ; verify it was installed
|
---|
33 | S DA=+$O(^DIC(9.4,"C","PRCP",0)),PRC5PRCP=DA_"^"_$G(^DIC(9.4,DA,"VERSION"))
|
---|
34 | I +$P(PRC5PRCP,"^",2)=5,$P($G(^DIC(9.4,DA,22,+$O(^DIC(9.4,DA,22,"B",PRCVERS,0)),0)),"^",3) S Y=$P(^(0),"^",3) D DD^%DT S $P(PRC5INS1,"^",3)=Y
|
---|
35 | I $P(PRC5INS1,"^",3)="" D NO Q
|
---|
36 | ;
|
---|
37 | ; install part 2, ifcap
|
---|
38 | W !!,"|",?78,"|",!,"|",?30,"----- PART 2 -----",?78,"|"
|
---|
39 | W !,"PART 2: INSTALLING IFCAP Main System ..."
|
---|
40 | S (PRCPFLAG,PRCINSTL)=0
|
---|
41 | I $P(PRC5INS2,"^",3)'="" D I PRCPFLAG Q
|
---|
42 | . S XP=" THIS PART HAS ALREADY BEEN INSTALLED. DO YOU WANT TO RE-INSTALL IT",XH=" ENTER 'YES' TO RE-INSTALL THE PART, 'NO' TO GO TO THE NEXT PART, '^' TO EXIT." S %=$$YN^PRCPUYN(2) I %=2 S PRCINSTL=1 Q
|
---|
43 | . I %'=1 S PRCPFLAG=1 Q
|
---|
44 | I 'PRCINSTL D
|
---|
45 | . D NOW^%DTC S Y=% D DD^%DT S PRCSTART=$J(Y,20) W ! D ^PRCINIT
|
---|
46 | . D NOW^%DTC S Y=% D DD^%DT S PRCEND=$J(Y,20)
|
---|
47 | . S PRCTEXT(11,0)="PART 2: IFCAP Main System "_PRCSTART_" "_PRCEND
|
---|
48 | ; verify it was installed
|
---|
49 | S DA=+$O(^DIC(9.4,"C","PRC",0)),PRC5PRC=DA_"^"_$G(^DIC(9.4,DA,"VERSION"))
|
---|
50 | I +$P(PRC5PRC,"^",2)=5,$P($G(^DIC(9.4,DA,22,+$O(^DIC(9.4,DA,22,"B",PRCVERS,0)),0)),"^",3) S Y=$P(^(0),"^",3) D DD^%DT S $P(PRC5INS2,"^",3)=Y
|
---|
51 | I $P(PRC5INS2,"^",3)="" D NO Q
|
---|
52 | ;
|
---|
53 | ;
|
---|
54 | ; fire off mailman message
|
---|
55 | D INSTALL^PRCPXTRM("IFCAP "_PRCVERS_" INSTALL","version "_PRCVERS,.PRCTEXT)
|
---|
56 | W !!,"================== *** INSTALLATION OPTION 1 COMPLETED *** ================="
|
---|
57 | W !,"CONGRATULATIONS ! IFCAP Version ",PRCVERS," - OPTION 1 COMPLETED."
|
---|
58 | S %="",$P(%,"=",80)="" W !,%
|
---|
59 | Q
|
---|
60 | NO ; not installed
|
---|
61 | W !!,"********************* === UNSUCCESSFUL INSTALLATION !! === ********************"
|
---|
62 | K X S X(1)="You will not be able to continue with the installation of IFCAP until this part has been successfully installed." D DISPLAY^PRCPUX2(1,78,.X)
|
---|
63 | W !,"PLEASE RE-RUN 'PRC5PKG' TO COMPLETE THE INSTALLATION !!"
|
---|
64 | W !,"*******************************************************************************"
|
---|
65 | Q
|
---|
66 | ;
|
---|
67 | ;
|
---|
68 | DESCRIP(FILESTRT,FILEEND) ; remove ifcap file descriptions (node 21)
|
---|
69 | ; from filestrt to fileend.
|
---|
70 | S FILESTRT=FILESTRT-.00001 F S FILESTRT=$O(^DD(FILESTRT)) Q:'FILESTRT!(FILESTRT>FILEEND) S FIELD=0 F S FIELD=$O(^DD(FILESTRT,FIELD)) Q:'FIELD!(FIELD>1007) K ^DD(FILESTRT,FIELD,21)
|
---|
71 | Q
|
---|