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

ZIBENVCK.m

Go to the documentation of this file.
  1. ZIBENVCK ; IHS/HQW/JDH - NO DESCRIPTION PROVIDED ; [ 04/02/2003 8:29 AM ]
  1. ;;8.0;KERNEL;**1004,1005,1007**;APR 1, 2003
  1. ;IHS UTILITY/JDH; environment check instll routine
  1. ; usage S X=$$MGR^ZIBSETUP(DEV_ROUTINE)
  1. ;
  1. ;
  1. ENVCHK ; IHS KIDS environment check utility
  1. ;N ZIBOS,ZIBOSVR,ZIBMSM,ZIBUSE,ZIBUSER
  1. ; check user
  1. W !!,"THIS IS THE IHS SPECIFIC ENVIRONMENT CHECK ROUTINE."
  1. W !!,"START OF ENVIRONMENT CHECK"
  1. W !,"NOTE: THE ENVIRONMENT CHECK IS PERFORMED DURING BOTH PACKAGE INSTALL AND LOAD"
  1. S ZIBUSER=$P($G(^VA(200,+$G(DUZ),0)),"^") ;if valid get name
  1. I '$L(ZIBUSER) D G QUIT ; user not valid
  1. .W !!,"You are not a valid user - either your DUZ is undefined,"
  1. .W !,"or this is a virgin install."
  1. ; prevent queueing of install
  1. S XPDNOQUE=1
  1. ; write out executing option name and demographics
  1. S ZIBOPT=$S('XPDENV:"'LOAD A DISTRIBUTION'",1:"'KIDS INSTALL'")
  1. W !!,"OPTION: "_ZIBOPT
  1. W !,"USER: "_ZIBUSER
  1. W !,"PATCH: "_XPDNM
  1. W !,"SITE: "_$P(^XMB(1,1,0),"^")
  1. S ZIBKRNL=$$VERSION^XPDUTL("XU") ; kernel version
  1. W !,"KERNEL VERSION: "_ZIBKRNL
  1. S ZIBTLKT=$$VERSION^XPDUTL("XT") ; VA toolkit version
  1. W !,"VA TOOLKIT VERSION: "_ZIBTLKT
  1. S ZIBOS=$P(^%ZOSF("OS"),"^") ; mumps OS
  1. S ZIBOSVR=$$VERSION^%ZOSV ; mumps version number
  1. W !,"M SYSTEM: "_ZIBOS_" VERSION "_ZIBOSVR
  1. S ZIBMSM=ZIBOS["MSM" ; boolean MSM 1 or 0
  1. S %=$ZU(0) ; current UCI/VOL
  1. W !,"CURRENT UCI/VOL: "_% ; verify single user
  1. ;S ZIBUSE=0 ; flag for the number of users on the system
  1. ;S:ZIBMSM ZIBUSE=$$LIST^%ACTJOB(.ZIBJOB)
  1. ;W !,"NUMBER OF USERS ON THE SYSTEM: "_ZIBUSE
  1. ;I ZIBUSE'=1 D ;G QUIT
  1. .W !!,"THIS "_ZIBOPT_" REQUIRES NO OTHER USERS ON THE SYSTEM."
  1. ; Can I show the system users, so the user can tell the others to get off or die!!!!!!!!!!!
  1. ; what to do if other than MSM system
  1. ; verify versions
  1. I ZIBOSVR<4.4 D G QUIT
  1. .W !!,"YOUR "_ZIBOS_" VERSION MUST BE GREATER THAN 4.4 FOR THIS "_ZIBOPT
  1. ; check versions
  1. I ZIBKRNL<8.0 D G QUIT
  1. .W !!,"YOU NEED KERNEL VERSION 8.0 OR GREATER TO RUN THIS INSTAll."
  1. ; verify single user mode
  1. ; if TASKMAN is running, shut it down
  1. S %=$D(^%ZTSCH("RUN")) ; check taskman run node
  1. W !!,"TASKMAN IS"_$S(%:"",1:" NOT")_" RUNNING"
  1. I % W !,"SHUTTING DOWN TASKMAN" D STOP^ZTMKU
  1. ;
  1. Q
  1. ;
  1. QUIT ; quit the KIDS install
  1. W !!,"THE HELP DESK"
  1. S XPDABORT=1 ;abort all transport globals in the distribution and kill them from ^XTMP
  1. ; if ^XTMP("XPDI") exists, the install option will abort
  1. Q
  1. ;
  1. VA() ; execute the VA's ZTMGRSET routine in the MGR uci
  1. Q S POP=0
  1. S ZIBCURR=$V(2,$J,2) ; get the number of the current UCI
  1. ; V 2:$J:1:2 sets the current uci to the Volume Group MGR uci
  1. ; V 2:$J:ZIBCURR:2 resets the current uci
  1. V 2:$J:1:2 W $ZU(0) D ^ZTMGRSET V 2:$J:ZIBCURR:2 Q POP
  1. ;
  1. MGRSET() ; copy a routine from the list into the volume groups uci
  1. ;
  1. ; Usage: S X=$$MGRSET^ZIBSETUP
  1. ;
  1. N POP S POP=0
  1. F I=1:1 S %=$P($T(MGR+I),";;",2) Q:%="END" D
  1. .S ZIBRPROD=$P(%,";"),ZIBRMGR=$P(%,";",2)
  1. .I $L(ZIBRPROD),$D(^$ROUTINE(ZIBRPROD)) D ; does the routine exist
  1. ..S %=$$MGRCHG(ZIBRPROD,ZIBRMGR),POP=1
  1. ..W !,"Routine "_ZIBRPROD_" copied from "_$P(%,"^")_" to "_$P(%,"^",2)
  1. Q POP
  1. ;
  1. MGRCHG(ZIBRPROD,ZIBRMGR) ; zsave a routine from the production uci to the MGR uci of
  1. ; the volume group
  1. ;
  1. ; input: routine name
  1. ; output: uci routine copied from^uci copied to
  1. ; usage: S X=$$MGRCHG^ZIBSETUP("routine_name")
  1. ;
  1. ;N ZIBCURR
  1. S ZIBRPROD=$TR(ZIBRPROD,"^"),ZIBRMGR=$TR(ZIBRMGR,"^") ; remove any "^" characters
  1. S ZIBCURR=$V(2,$J,2) ; get the number of the current UCI
  1. ; V 2:$J:1:2 sets the current uci to the Volume Group MGR uci
  1. ; V 2:$J:ZIBCURR:2 resets the current uci
  1. S %="ZL @ZIBRPROD V 2:$J:1:2 ZS @ZIBRMGR V 2:$J:ZIBCURR:2"
  1. X % Q $ZU(0)_"^"_$ZU(1,0)
  1. ;
  1. MGR ; list of routines to copy into the MGR UCI of the Volume group. END marks the end of the list
  1. ;;ZZHAY1;%ZZHAY
  1. ;;END
  1. ;;DIDT;%DT
  1. ;;DIDTC;%DTC
  1. ;;END