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

XOBWENV.m

Go to the documentation of this file.
  1. XOBWENV ;ALB/MJK - HWSC :: Environmental Check ; 06/10/2016
  1. ;;1.0;HwscWebServiceClient;**4**;September 13, 2010;Build 9
  1. ;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. ; ***** IMPORTANT NOTE *******************************************
  1. ; This routine requires access to the manager (%SYS) namespace and
  1. ; can only be run by a user with permissions to that namespace.
  1. ; ****************************************************************
  1. ;
  1. Q
  1. EN ;- entry point
  1. ; -- must be a supported M implementation
  1. DO VALIDM IF $GET(XPDABORT) GOTO ENQ
  1. ; -- passed load check
  1. IF '$GET(XPDENV),'$GET(XPDABORT) DO
  1. . WRITE !!?1,">>> Environment check completed for KIDS Load a Distribution option.",!
  1. ; -- passed install check
  1. IF $GET(XPDENV)=1,'$GET(XPDABORT) DO
  1. . WRITE !!?1,">>> Environment check completed for KIDS Install Package option.",!
  1. ENQ QUIT
  1. ;
  1. VALIDM ; -- check if HWSC supports M implementation and set KIDS flag if not
  1. IF $$PROD^XUPROD(0),'$$SSLOK() DO
  1. . WRITE !,"Note: Your current production M environment does not support SSL/TLS"
  1. . WRITE !," connectivity! SSL/TLS support is provided in Cache v5.2.3 and greater."
  1. . WRITE !," Also, SSL/TLS is not currently supported on VMS."
  1. . NEW DIR S DIR(0)="E" D ^DIR
  1. ;
  1. IF '$$OSOK() DO
  1. . SET XPDABORT=1
  1. . WRITE !?5,"This software can only be installed in a Cache v5.2.3 or greater environment!",!
  1. QUIT
  1. ;
  1. OSOK() ; -- check environment for operating system, 5.2.3 or greater
  1. IF $PIECE($GET(^%ZOSF("OS")),"^")'["OpenM" QUIT 0
  1. NEW XOBVER,MAJOR,MINOR,SUBMINOR
  1. SET XOBVER=$$VERSION^%ZOSV()
  1. ; -- checks major version # against 5
  1. SET MAJOR=+$P(XOBVER,".")
  1. IF MAJOR<5 QUIT 0
  1. IF MAJOR>5 QUIT 1
  1. ; -- checks minor version # against 2
  1. SET MINOR=+$P(XOBVER,".",2)
  1. IF MINOR<2 QUIT 0
  1. IF MINOR>2 QUIT 1
  1. ; -- checks sub-minor version # against 3
  1. SET SUBMINOR=+$P(XOBVER,".",3)
  1. IF SUBMINOR<3 QUIT 0
  1. IF SUBMINOR>2 QUIT 1
  1. QUIT 0
  1. ;
  1. SSLOK() ; -- check environment if SSL/TLS is supported (Cache 5.2.3 or greater, and *not* VMS)
  1. ; also called in [XOBW WEB SERVER SETUP] edit template
  1. ;IF $$SYSOS()="VMS" QUIT 0 ; prevent SSL use on VMS ; - XOBW*1*4
  1. QUIT $$OSOK() ; 5.2.3 or greater
  1. ;
  1. KIDSCHK(XOBDIR) ; -- check input from installer
  1. ; input: XOBDIR := directory where wsdl file is located (
  1. ; Note: If applicable, XOBDIR should contain the os-specific final delimiter, like '/home/cache/'
  1. NEW XOBPATH
  1. IF '##class(%File).DirectoryExists(XOBDIR) DO QUIT 0
  1. . WRITE !," o Directory does not exist: "_XOBDIR
  1. SET XOBPATH=XOBDIR_$$SUPPORT()
  1. IF '##class(%File).Exists(XOBPATH) DO QUIT 0
  1. . WRITE !," o File to be imported does not exist: "_XOBPATH
  1. QUIT 1
  1. ;
  1. SUPPORT() ; -- returns name of xml file containing support classes (wsdl handler, vista info header, etc.)
  1. QUIT "xobw4.xml"
  1. ;
  1. VERSION() ; -- returns the version number for this build
  1. QUIT +$PIECE($PIECE($TEXT(XOBWENV+1),";",7),"Build ",2)
  1. ;
  1. SYSOS() ; -- get system operating system
  1. ; returns VMS, UNIX, NT or UNK
  1. NEW XOBOS SET XOBOS=^%ZOSF("OS")
  1. QUIT $SELECT(XOBOS["OpenM":$$OS^%ZOSV(),XOBOS["DSM":"VMS",1:"UNK")