- BMXE01 ; IHS/OIT/FJE - ENVIRONMENT CHECK FOR BMX 4.0 ; 03 Jun 2010 9:39 AM
- ;;4.0;BMX;;JUN 28, 2010
- ;
- S $P(LINE,"*",81)=""
- S XPDNOQUE="NO QUE" ;NO QUEUING ALLOWED
- S XPDABORT=0
- I '$G(DUZ) W !,"DUZ UNDEFINED OR 0." S XPX="DUZ" D SORRY Q
- ;
- I '$L($G(DUZ(0))) W !,"DUZ(0) UNDEFINED OR NULL." S XPX="DUZ" D SORRY Q
- ;
- D HOME^%ZIS,DT^DICRW
- S X=$P($G(^VA(200,DUZ,0)),U)
- I $G(X)="" W !,$$C^XBFUNC("Who are you????") S XPX="DUZ" D SORRY Q
- W !,$$C^XBFUNC("Hello, "_$P(X,",",2)_" "_$P(X,","))
- W !!,$$C^XBFUNC("Checking Environment for Install of Version "_$P($T(+2),";",3)_" of "_$P($T(+2),";",4)_".")
- ;
- S X=$G(^DD("VERSION"))
- W !!,$$C^XBFUNC("Need at least FileMan 22.....FileMan "_X_" Present")
- I X<22 S XPX="FM" D SORRY Q
- ;
- S X=$G(^DIC(9.4,$O(^DIC(9.4,"C","XU",0)),"VERSION"))
- W !!,$$C^XBFUNC("Need at least Kernel 8.0.....Kernel "_X_" Present")
- I X<8.0 S XPX="KERNEL" D SORRY Q
- ;
- DNS ; MAKE SURE THERE IS A VALID DNS IP ADDRESS (OR A NULL VALUE) IN THE KERNEL SYSTEM PARAMETERS FILE
- N DNS,POP,%
- W !!,$$C^XBFUNC("Checking Kernel system parameters. This may take 1 minute...")
- S DNS=$G(^XTV(8989.3,1,"DNS"))
- I DNS="" G DNS1
- I DNS="161.223.91.184" D DNSERR Q
- D CALL^%ZISTCP(DNS,53) I POP D CLOSE^%ZISTCP,DNSERR Q
- DNS1 D CLOSE^%ZISTCP
- W !,$$C^XBFUNC("Kernel system parameters validated")
- ;
- ENVOK ; If this is just an environ check, end here.
- W !!,$$C^XBFUNC("ENVIRONMENT OK.")
- ;
- ; The following line prevents the "Disable Options..." and "Move
- ; Routines..." questions from being asked during the install.
- I $G(XPDENV)=1 S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
- I $G(XPDENV)=1 D ;Updates BMX Version file
- .S X="2",DIC="^BMXAPPL(",DLAYGO=90093.2,DIC(0)="E" K DD,D0 D FILE^DICN
- .S DA=+Y
- .S:+DA DIE="^BMXAPPL(",DR=".02///0;.03////"_DT D ^DIE
- .K DIE,DA
- Q
- ;
- DNSERR W !,$$C^XBFUNC("The DNS IP address in the KERNEL SYSTEM PARAMETERS file is invalid!!!")
- W !,$$C^XBFUNC("You must enter a valid IP in the DNS IP field (or null) before ")
- W !,$$C^XBFUNC("installing this package")
- ;
- SORRY ;
- K DIFQ
- S XPDABORT=1
- W *7,!!!,$$C^XBFUNC("Sorry....something is wrong with your environment")
- W !,$$C^XBFUNC("Aborting BMX Version 4.0 Install!")
- W !,$$C^XBFUNC("Correct error and reinstall otherwise")
- W !,$$C^XBFUNC("please print/capture this screen and notify")
- W !,$$C^XBFUNC("the Help Desk at 888-830-7280")
- W !!,LINE
- D BMES^XPDUTL("Sorry....something is wrong with your environment")
- D BMES^XPDUTL("Enviroment ERROR "_$G(XPX))
- D BMES^XPDUTL("Aborting BMX Patch 1 install!")
- D BMES^XPDUTL("Correct error and reinstall otherwise")
- D BMES^XPDUTL("please print/capture this screen and notify")
- D BMES^XPDUTL("the Help Desk at 888-830-7280")
- Q
- ;
- BMXE01 ; IHS/OIT/FJE - ENVIRONMENT CHECK FOR BMX 4.0 ; 03 Jun 2010 9:39 AM
- +1 ;;4.0;BMX;;JUN 28, 2010
- +2 ;
- +3 SET $PIECE(LINE,"*",81)=""
- +4 ;NO QUEUING ALLOWED
- SET XPDNOQUE="NO QUE"
- +5 SET XPDABORT=0
- +6 IF '$GET(DUZ)
- WRITE !,"DUZ UNDEFINED OR 0."
- SET XPX="DUZ"
- DO SORRY
- QUIT
- +7 ;
- +8 IF '$LENGTH($GET(DUZ(0)))
- WRITE !,"DUZ(0) UNDEFINED OR NULL."
- SET XPX="DUZ"
- DO SORRY
- QUIT
- +9 ;
- +10 DO HOME^%ZIS
- DO DT^DICRW
- +11 SET X=$PIECE($GET(^VA(200,DUZ,0)),U)
- +12 IF $GET(X)=""
- WRITE !,$$C^XBFUNC("Who are you????")
- SET XPX="DUZ"
- DO SORRY
- QUIT
- +13 WRITE !,$$C^XBFUNC("Hello, "_$PIECE(X,",",2)_" "_$PIECE(X,","))
- +14 WRITE !!,$$C^XBFUNC("Checking Environment for Install of Version "_$PIECE($TEXT(+2),";",3)_" of "_$PIECE($TEXT(+2),";",4)_".")
- +15 ;
- +16 SET X=$GET(^DD("VERSION"))
- +17 WRITE !!,$$C^XBFUNC("Need at least FileMan 22.....FileMan "_X_" Present")
- +18 IF X<22
- SET XPX="FM"
- DO SORRY
- QUIT
- +19 ;
- +20 SET X=$GET(^DIC(9.4,$ORDER(^DIC(9.4,"C","XU",0)),"VERSION"))
- +21 WRITE !!,$$C^XBFUNC("Need at least Kernel 8.0.....Kernel "_X_" Present")
- +22 IF X<8.0
- SET XPX="KERNEL"
- DO SORRY
- QUIT
- +23 ;
- DNS ; MAKE SURE THERE IS A VALID DNS IP ADDRESS (OR A NULL VALUE) IN THE KERNEL SYSTEM PARAMETERS FILE
- +1 NEW DNS,POP,%
- +2 WRITE !!,$$C^XBFUNC("Checking Kernel system parameters. This may take 1 minute...")
- +3 SET DNS=$GET(^XTV(8989.3,1,"DNS"))
- +4 IF DNS=""
- GOTO DNS1
- +5 IF DNS="161.223.91.184"
- DO DNSERR
- QUIT
- +6 DO CALL^%ZISTCP(DNS,53)
- IF POP
- DO CLOSE^%ZISTCP
- DO DNSERR
- QUIT
- DNS1 DO CLOSE^%ZISTCP
- +1 WRITE !,$$C^XBFUNC("Kernel system parameters validated")
- +2 ;
- ENVOK ; If this is just an environ check, end here.
- +1 WRITE !!,$$C^XBFUNC("ENVIRONMENT OK.")
- +2 ;
- +3 ; The following line prevents the "Disable Options..." and "Move
- +4 ; Routines..." questions from being asked during the install.
- +5 IF $GET(XPDENV)=1
- SET (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
- +6 ;Updates BMX Version file
- IF $GET(XPDENV)=1
- Begin DoDot:1
- +7 SET X="2"
- SET DIC="^BMXAPPL("
- SET DLAYGO=90093.2
- SET DIC(0)="E"
- KILL DD,D0
- DO FILE^DICN
- +8 SET DA=+Y
- +9 IF +DA
- SET DIE="^BMXAPPL("
- SET DR=".02///0;.03////"_DT
- DO ^DIE
- +10 KILL DIE,DA
- End DoDot:1
- +11 QUIT
- +12 ;
- DNSERR WRITE !,$$C^XBFUNC("The DNS IP address in the KERNEL SYSTEM PARAMETERS file is invalid!!!")
- +1 WRITE !,$$C^XBFUNC("You must enter a valid IP in the DNS IP field (or null) before ")
- +2 WRITE !,$$C^XBFUNC("installing this package")
- +3 ;
- SORRY ;
- +1 KILL DIFQ
- +2 SET XPDABORT=1
- +3 WRITE *7,!!!,$$C^XBFUNC("Sorry....something is wrong with your environment")
- +4 WRITE !,$$C^XBFUNC("Aborting BMX Version 4.0 Install!")
- +5 WRITE !,$$C^XBFUNC("Correct error and reinstall otherwise")
- +6 WRITE !,$$C^XBFUNC("please print/capture this screen and notify")
- +7 WRITE !,$$C^XBFUNC("the Help Desk at 888-830-7280")
- +8 WRITE !!,LINE
- +9 DO BMES^XPDUTL("Sorry....something is wrong with your environment")
- +10 DO BMES^XPDUTL("Enviroment ERROR "_$GET(XPX))
- +11 DO BMES^XPDUTL("Aborting BMX Patch 1 install!")
- +12 DO BMES^XPDUTL("Correct error and reinstall otherwise")
- +13 DO BMES^XPDUTL("please print/capture this screen and notify")
- +14 DO BMES^XPDUTL("the Help Desk at 888-830-7280")
- +15 QUIT
- +16 ;