Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BMXE01

BMXE01.m

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