DIZP2ENV ;IHS/OIRM/DSD/AEF - PATCH DI*22.0*1001 ENVIRONMENT CHECK ROUTINE [ 02/12/2004 10:07 AM ]
;;22.0;VA FileMan;**1002**;APR 1, 2003
;
EN ;EP -- MAIN ENTRY POINT
;
D ^XBKVAR
D NOQUE
D VERSION
D PATCH
D NOASK
D TMCHK^DIENVWRN
D OK
Q
NOQUE ;----- PREVENT QUEUEING OF INSTALL
;
S XPDNOQUE=1
Q
VERSION ;----- CHECK VERSION
;
I "22.0"'=$$VERSION^XPDUTL("VA FILEMAN") D
. S XPDQUIT=1
. D BMES^XPDUTL("CURRENT VERSION IS NOT 22.0, CANNOT CONTINUE WITH INSTALL")
Q
PATCH ;----- CHECK PATCH 1001 LOADED
N I,J
S I=+$O(^DIC(9.4,"C","DI",0))
S J=+$O(^DIC(9.4,I,22,"B","22.0",0))
I '$D(^DIC(9.4,I,22,J,"PAH","B",1001)) D
.S XPDQUIT=1
.D BMES^XPDUTL("PATCH 1001 NOT INSTALLED, CANNOT CONTINUE WITH INSTALL")
Q
NOASK ;----- SUPPRESS ASK 'DISABLE OPTS','MOVE ROUTINES' PROMPTS
;
S XPDDIQ("XPZ1")=0 ;'DISABLE OPTIONS' SET DEFAULT TO 'NO' & NOT ASK
S XPDDIQ("XPZ2")=0 ;'MOVE ROUTINES' SET DEFAULT TO 'NO' & NOT ASK
Q
OK ;----- OK TO INSTALL?
;
I $G(XPDQUIT) D
. D BMES^XPDUTL("INSTALL ABORTED!")
I '$G(XPDQUIT) D
. D BMES^XPDUTL("EVERYTHING LOOKS OK")
Q
DIZP2ENV ;IHS/OIRM/DSD/AEF - PATCH DI*22.0*1001 ENVIRONMENT CHECK ROUTINE [ 02/12/2004 10:07 AM ]
+1 ;;22.0;VA FileMan;**1002**;APR 1, 2003
+2 ;
EN ;EP -- MAIN ENTRY POINT
+1 ;
+2 DO ^XBKVAR
+3 DO NOQUE
+4 DO VERSION
+5 DO PATCH
+6 DO NOASK
+7 DO TMCHK^DIENVWRN
+8 DO OK
+9 QUIT
NOQUE ;----- PREVENT QUEUEING OF INSTALL
+1 ;
+2 SET XPDNOQUE=1
+3 QUIT
VERSION ;----- CHECK VERSION
+1 ;
+2 IF "22.0"'=$$VERSION^XPDUTL("VA FILEMAN")
Begin DoDot:1
+3 SET XPDQUIT=1
+4 DO BMES^XPDUTL("CURRENT VERSION IS NOT 22.0, CANNOT CONTINUE WITH INSTALL")
End DoDot:1
+5 QUIT
PATCH ;----- CHECK PATCH 1001 LOADED
+1 NEW I,J
+2 SET I=+$ORDER(^DIC(9.4,"C","DI",0))
+3 SET J=+$ORDER(^DIC(9.4,I,22,"B","22.0",0))
+4 IF '$DATA(^DIC(9.4,I,22,J,"PAH","B",1001))
Begin DoDot:1
+5 SET XPDQUIT=1
+6 DO BMES^XPDUTL("PATCH 1001 NOT INSTALLED, CANNOT CONTINUE WITH INSTALL")
End DoDot:1
+7 QUIT
NOASK ;----- SUPPRESS ASK 'DISABLE OPTS','MOVE ROUTINES' PROMPTS
+1 ;
+2 ;'DISABLE OPTIONS' SET DEFAULT TO 'NO' & NOT ASK
SET XPDDIQ("XPZ1")=0
+3 ;'MOVE ROUTINES' SET DEFAULT TO 'NO' & NOT ASK
SET XPDDIQ("XPZ2")=0
+4 QUIT
OK ;----- OK TO INSTALL?
+1 ;
+2 IF $GET(XPDQUIT)
Begin DoDot:1
+3 DO BMES^XPDUTL("INSTALL ABORTED!")
End DoDot:1
+4 IF '$GET(XPDQUIT)
Begin DoDot:1
+5 DO BMES^XPDUTL("EVERYTHING LOOKS OK")
End DoDot:1
+6 QUIT