PRC5PKG ;WISC/PLT-IFCAP V5 INSTALLATION/UPDATE OPTION ; 04/10/95 3:14 PM
V ;;5.0;IFCAP;;4/21/95
;QUIT ; invalid entry
;
EN ;start installation/update
N PRCIVER,PRCRI,PRCFIXV,PRCOPT,PRC5INST,PRCQ21
Q1 D EN^DDIOL(" ") S PRCFIXV="IFCAP"_$P($T(+2^PRCINIT),";",3)
S PRCIVER=$$IVER("IFCAP",PRCFIXV),A="NO VERSION" S:PRCIVER A="V."_PRCIVER
S B="this RELEASE of "_$E(PRCFIXV,6,999) I $O(^PRCU(420.92,"B",PRCFIXV,0)) S B="you ran OPTION 1"
D YN^PRC0A(.X,.Y,"Did you have "_A_" of IFCAP INSTALLED before "_B,"O","")
G:X["^"!(X="") EXIT
I 'Y D EN^DDIOL("Please contact your ISC SUPPORT. According to the system your site has IFCAP "_$S(PRCIVER<1:"NOT",1:"VERSION "_PRCIVER)_" installed.") G EXIT
I 'PRCIVER,$O(^PRC(420,0)) D EN^DDIOL("Please call IRM/ISC SUPPORT to check your response because you said 'IFCAP' is not installed, but there is an entry in FUND CONTOL POINT FILE.") G EXIT
Q2 D EN^DDIOL(" "),EN^DDIOL("If IFCAP 5.0 has already been installed prior to this release, run option")
D EN^DDIOL("1 only. If IFCAP 4.0 is installed on your system, run options")
D EN^DDIOL("1, 2, 3, and 4. If no version of IFCAP is installed on your system, run")
D EN^DDIOL("options 1 and 2.")
D EN^DDIOL(" ")
D EN^DDIOL("If you have to rerun an option, you also have to rerun the options")
D EN^DDIOL("following it, i.e., if you ran option 1, 2, 3, and 4, and you have to rerun")
D EN^DDIOL("option 2, you also have to rerun option 3 and 4."),EN^DDIOL(" ")
D SC^PRC0A(.X,.Y,"Select IFCAP V5 install/update option","OM^1:Install IFCAP Files,Options,Templates (2 parts);2:Convert FMS PCL/PAC/FND/CPF;3:Recalc Control Point Balances;4:File 442 Conversion & Generating FMS Documents","")
G:X["^"!(X="") EXIT
S PRCOPT=X
I PRCOPT'=1,PRCIVER'<5 D EN^DDIOL("This option is not available to your site with IFCAP VERSION "_PRCIVER_" installed.") G Q1
I PRCOPT>2,'PRCIVER D EN^DDIOL("This option is not available to your site with IFCAP VIRGIN installation.") G Q1
;validate selected option order
I PRCOPT>1 D I 'PRCOPT D EN^DDIOL("You need to select '1' first") G Q1
. S A="" S PRCRI(9.4)=$O(^DIC(9.4,"B","IFCAP",0)) I PRCRI(9.4) S A=+$P(^DIC(9.4,PRCRI(9.4),"VERSION"),"^",1)
. S:A<5 PRCOPT=""
I PRCOPT>2 D I 'PRCOPT D EN^DDIOL("You need to select '2' first") G Q1
. S PRCRI(420.92)=$O(^PRCU(420.92,"B",PRCFIXV,"")) S:'PRCRI(420.92) PRCOPT=""
. I PRCRI(420.92) S:$P($G(^PRCU(420.92,PRCRI(420.92),0)),"^",6)="" PRCOPT=""
. QUIT
I PRCOPT>3 D I 'PRCOPT D EN^DDIOL("You need to select '3' first") G Q1
. S PRCRI(420.92)=$O(^PRCU(420.92,"B",PRCFIXV,"")) S:'PRCRI(420.92) PRCOPT=""
. I PRCRI(420.92) S:$P($G(^PRCU(420.92,PRCRI(420.92),0)),"^",4)="" PRCOPT=""
. QUIT
I PRCOPT=4 D EN^DDIOL("Please make sure no other file 442 conversion task is scheduled or running. If there is one you can delete the other one and start this one") D G:X["^"!(X="") Q1 S PRCQ21=Y
. D YN^PRC0A(.X,.Y,"Submit the File 442 Conversion & Generating FMS Doc. to the TASK MANAGER","O","")
. QUIT
Q3 D YN^PRC0A(.X,.Y,"Ready to run the selected option '"_PRCOPT_"'","O","NO")
G:X["^"!(X="")!(Y<1) EXIT
I PRCOPT=1 D ^PRC5INST G Q1:$G(PRC5INST),EXIT
I PRCOPT=2 D EN2^PRC5B G EXIT
I PRCOPT=3 D EN3^PRC5B G EXIT
I PRCOPT=4 D EN4^PRC5B
EXIT ;
QUIT
;
;prca=package name .01 in file 9.4, prcb=fix value .01 in file 420.92
IVER(PRCA,PRCB) ;get initial version #
N A
S A="",PRCRI(420.92)=$O(^PRCU(420.92,"B",PRCB,0)) I PRCRI(420.92) D
. S A=$P(^PRCU(420.92,PRCRI(420.92),0),"^",2)
. QUIT
I A="" S PRCRI(9.4)=$O(^DIC(9.4,"B",PRCA,0)) I PRCRI(9.4) D
. S A=$P(^DIC(9.4,PRCRI(9.4),"VERSION"),"^",1)
. QUIT
QUIT +A
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRC5PKG 3659 printed Dec 13, 2024@02:00:04 Page 2
PRC5PKG ;WISC/PLT-IFCAP V5 INSTALLATION/UPDATE OPTION ; 04/10/95 3:14 PM
V ;;5.0;IFCAP;;4/21/95
+1 ;QUIT ; invalid entry
+2 ;
EN ;start installation/update
+1 NEW PRCIVER,PRCRI,PRCFIXV,PRCOPT,PRC5INST,PRCQ21
Q1 DO EN^DDIOL(" ")
SET PRCFIXV="IFCAP"_$PIECE($TEXT(+2^PRCINIT),";",3)
+1 SET PRCIVER=$$IVER("IFCAP",PRCFIXV)
SET A="NO VERSION"
if PRCIVER
SET A="V."_PRCIVER
+2 SET B="this RELEASE of "_$EXTRACT(PRCFIXV,6,999)
IF $ORDER(^PRCU(420.92,"B",PRCFIXV,0))
SET B="you ran OPTION 1"
+3 DO YN^PRC0A(.X,.Y,"Did you have "_A_" of IFCAP INSTALLED before "_B,"O","")
+4 if X["^"!(X="")
GOTO EXIT
+5 IF 'Y
DO EN^DDIOL("Please contact your ISC SUPPORT. According to the system your site has IFCAP "_$SELECT(PRCIVER<1:"NOT",1:"VERSION "_PRCIVER)_" installed.")
GOTO EXIT
+6 IF 'PRCIVER
IF $ORDER(^PRC(420,0))
DO EN^DDIOL("Please call IRM/ISC SUPPORT to check your response because you said 'IFCAP' is not installed, but there is an entry in FUND CONTOL POINT FILE.")
GOTO EXIT
Q2 DO EN^DDIOL(" ")
DO EN^DDIOL("If IFCAP 5.0 has already been installed prior to this release, run option")
+1 DO EN^DDIOL("1 only. If IFCAP 4.0 is installed on your system, run options")
+2 DO EN^DDIOL("1, 2, 3, and 4. If no version of IFCAP is installed on your system, run")
+3 DO EN^DDIOL("options 1 and 2.")
+4 DO EN^DDIOL(" ")
+5 DO EN^DDIOL("If you have to rerun an option, you also have to rerun the options")
+6 DO EN^DDIOL("following it, i.e., if you ran option 1, 2, 3, and 4, and you have to rerun")
+7 DO EN^DDIOL("option 2, you also have to rerun option 3 and 4.")
DO EN^DDIOL(" ")
+8 DO SC^PRC0A(.X,.Y,"Select IFCAP V5 install/update option","OM^1:Install IFCAP Files,Options,Templates (2 parts);2:Convert FMS PCL/PAC/FND/CPF;3:Recalc Control Point Balances;4:File 442 Conversion & Generating FMS Documents","")
+9 if X["^"!(X="")
GOTO EXIT
+10 SET PRCOPT=X
+11 IF PRCOPT'=1
IF PRCIVER'<5
DO EN^DDIOL("This option is not available to your site with IFCAP VERSION "_PRCIVER_" installed.")
GOTO Q1
+12 IF PRCOPT>2
IF 'PRCIVER
DO EN^DDIOL("This option is not available to your site with IFCAP VIRGIN installation.")
GOTO Q1
+13 ;validate selected option order
+14 IF PRCOPT>1
Begin DoDot:1
+15 SET A=""
SET PRCRI(9.4)=$ORDER(^DIC(9.4,"B","IFCAP",0))
IF PRCRI(9.4)
SET A=+$PIECE(^DIC(9.4,PRCRI(9.4),"VERSION"),"^",1)
+16 if A<5
SET PRCOPT=""
End DoDot:1
IF 'PRCOPT
DO EN^DDIOL("You need to select '1' first")
GOTO Q1
+17 IF PRCOPT>2
Begin DoDot:1
+18 SET PRCRI(420.92)=$ORDER(^PRCU(420.92,"B",PRCFIXV,""))
if 'PRCRI(420.92)
SET PRCOPT=""
+19 IF PRCRI(420.92)
if $PIECE($GET(^PRCU(420.92,PRCRI(420.92),0)),"^",6)=""
SET PRCOPT=""
+20 QUIT
End DoDot:1
IF 'PRCOPT
DO EN^DDIOL("You need to select '2' first")
GOTO Q1
+21 IF PRCOPT>3
Begin DoDot:1
+22 SET PRCRI(420.92)=$ORDER(^PRCU(420.92,"B",PRCFIXV,""))
if 'PRCRI(420.92)
SET PRCOPT=""
+23 IF PRCRI(420.92)
if $PIECE($GET(^PRCU(420.92,PRCRI(420.92),0)),"^",4)=""
SET PRCOPT=""
+24 QUIT
End DoDot:1
IF 'PRCOPT
DO EN^DDIOL("You need to select '3' first")
GOTO Q1
+25 IF PRCOPT=4
DO EN^DDIOL("Please make sure no other file 442 conversion task is scheduled or running. If there is one you can delete the other one and start this one")
Begin DoDot:1
+26 DO YN^PRC0A(.X,.Y,"Submit the File 442 Conversion & Generating FMS Doc. to the TASK MANAGER","O","")
+27 QUIT
End DoDot:1
if X["^"!(X="")
GOTO Q1
SET PRCQ21=Y
Q3 DO YN^PRC0A(.X,.Y,"Ready to run the selected option '"_PRCOPT_"'","O","NO")
+1 if X["^"!(X="")!(Y<1)
GOTO EXIT
+2 IF PRCOPT=1
DO ^PRC5INST
if $GET(PRC5INST)
GOTO Q1
GOTO EXIT
+3 IF PRCOPT=2
DO EN2^PRC5B
GOTO EXIT
+4 IF PRCOPT=3
DO EN3^PRC5B
GOTO EXIT
+5 IF PRCOPT=4
DO EN4^PRC5B
EXIT ;
+1 QUIT
+2 ;
+3 ;prca=package name .01 in file 9.4, prcb=fix value .01 in file 420.92
IVER(PRCA,PRCB) ;get initial version #
+1 NEW A
+2 SET A=""
SET PRCRI(420.92)=$ORDER(^PRCU(420.92,"B",PRCB,0))
IF PRCRI(420.92)
Begin DoDot:1
+3 SET A=$PIECE(^PRCU(420.92,PRCRI(420.92),0),"^",2)
+4 QUIT
End DoDot:1
+5 IF A=""
SET PRCRI(9.4)=$ORDER(^DIC(9.4,"B",PRCA,0))
IF PRCRI(9.4)
Begin DoDot:1
+6 SET A=$PIECE(^DIC(9.4,PRCRI(9.4),"VERSION"),"^",1)
+7 QUIT
End DoDot:1
+8 QUIT +A