XUINOK ;SFISC/RWF - CHECK TO SEE IF OK TO LOAD ;06/02/95 12:23
;;8.0;KERNEL;**1002,1003,1004,1005,1007,1016**;APR 1, 2003;Build 5
;;8.0;KERNEL;;Jul 10, 1995
;THIS ROUTINE CONTAINS A LOCAL IHS MODIFICATION BY IHS/MFD
N Y
;----- BEGIN IHS MODIFICATION - XU*8.0*1007
;This new line of code was added to make sure the variables DUZ and
;DUZ(0) are defined to prevent install from aborting. Original
;modification done by IHS/MFD
S DUZ=1,DUZ(0)="@"
;----- END IHS MODIFICATION
I $S($D(DUZ)[0:1,$D(DUZ(0))[0:1,'DUZ:1,1:0) W !!,*7,">> DUZ and DUZ(0) must be defined as an active user to initialize." G EXIT
;
W !,"I'm checking to see if it is OK to install KERNEL v",$P($T(+2),";",3)," in this account.",!
W !!,"Checking the %ZOSV routine" D GETENV^%ZOSV
I $P(Y,"^",4)="" W !,"The %ZOSV routine isn't current.",!,"Check the second line of the routine, or your routine map table." G EXIT
;must have Kernel 7.1
S Y=$$VERSION^XPDUTL("XU") G:Y&(Y<7.1) OLD
;during Install, check global access,MM routine, and OS
;XPDDIQ = don't ask DISABLE OPTIONS question
;XPDNOQUE = not to allow queueing during install
I $G(XPDENV) D GBLOK,MMCHK,OS S XPDDIQ("XPZ1")=0,XPDNOQUE=1
Q:$G(XPDQUIT)
W !!,"Everything looks OK, Lets continue.",!
Q
;
OLD W !!,*7,"It looks like you currently have version ",Y," of KERNEL installed."
W !,*7,"You must first install KERNEL v7.1 before this version can be installed.",!
ABRT S XPDQUIT=1 Q
EXIT S XPDQUIT=2 Q
;
Q
GBLOK ;Check to see if we have write access to needed globals.
W !,"Now to check protection on GLOBALS.",!,"If you get an ERROR, you need to add Write access to that global.",!
F Y="^%ZIS","^%ZISL","^%ZTER","^%ZUA" W !,"Checking ",Y S @(Y_"=$G("_Y_")")
Q
MMCHK ;check XMGAPI4
N X
S X="XMGAPI4" X ^%ZOSF("TEST") E Q
;if exists, skip routine during load
S X=$$RTNUP^XPDUTL("XMGAPI4",2)
Q
OS ;checks OS and skips all other ZU routines
;XUZURTN = ZU routine to save, checked in XUINPRE
N X,XUNU,XUNU1,XUOS
S X=$G(^%ZOSF("OS")),XUOS="VXD^DTM^MSM^MSQ"
F XUNU=1:1:4 S XUNU1=X[$P("DSM^DTM^MSM^M/SQL",U,XUNU) Q:XUNU1
Q:'XUNU1
F XUNU1=1:1:4 S:XUNU'=XUNU1 X=$$RTNUP^XPDUTL("ZU"_$P(XUOS,U,XUNU1),2)
S XUZURTN="ZU"_$P(XUOS,U,XUNU)
Q
XUINOK ;SFISC/RWF - CHECK TO SEE IF OK TO LOAD ;06/02/95 12:23
+1 ;;8.0;KERNEL;**1002,1003,1004,1005,1007,1016**;APR 1, 2003;Build 5
+2 ;;8.0;KERNEL;;Jul 10, 1995
+3 ;THIS ROUTINE CONTAINS A LOCAL IHS MODIFICATION BY IHS/MFD
+4 NEW Y
+5 ;----- BEGIN IHS MODIFICATION - XU*8.0*1007
+6 ;This new line of code was added to make sure the variables DUZ and
+7 ;DUZ(0) are defined to prevent install from aborting. Original
+8 ;modification done by IHS/MFD
+9 SET DUZ=1
SET DUZ(0)="@"
+10 ;----- END IHS MODIFICATION
+11 IF $SELECT($DATA(DUZ)[0:1,$DATA(DUZ(0))[0:1,'DUZ:1,1:0)
WRITE !!,*7,">> DUZ and DUZ(0) must be defined as an active user to initialize."
GOTO EXIT
+12 ;
+13 WRITE !,"I'm checking to see if it is OK to install KERNEL v",$PIECE($TEXT(+2),";",3)," in this account.",!
+14 WRITE !!,"Checking the %ZOSV routine"
DO GETENV^%ZOSV
+15 IF $PIECE(Y,"^",4)=""
WRITE !,"The %ZOSV routine isn't current.",!,"Check the second line of the routine, or your routine map table."
GOTO EXIT
+16 ;must have Kernel 7.1
+17 SET Y=$$VERSION^XPDUTL("XU")
IF Y&(Y<7.1)
GOTO OLD
+18 ;during Install, check global access,MM routine, and OS
+19 ;XPDDIQ = don't ask DISABLE OPTIONS question
+20 ;XPDNOQUE = not to allow queueing during install
+21 IF $GET(XPDENV)
DO GBLOK
DO MMCHK
DO OS
SET XPDDIQ("XPZ1")=0
SET XPDNOQUE=1
+22 IF $GET(XPDQUIT)
QUIT
+23 WRITE !!,"Everything looks OK, Lets continue.",!
+24 +25 QUIT
+26 ;
OLD WRITE !!,*7,"It looks like you currently have version ",Y," of KERNEL installed."
+1 WRITE !,*7,"You must first install KERNEL v7.1 before this version can be installed.",!
ABRT SET XPDQUIT=1
QUIT
EXIT SET XPDQUIT=2
QUIT
+1 ;
+2 QUIT
GBLOK ;Check to see if we have write access to needed globals.
+1 WRITE !,"Now to check protection on GLOBALS.",!,"If you get an ERROR, you need to add Write access to that global.",!
+2 FOR Y="^%ZIS","^%ZISL","^%ZTER","^%ZUA"
WRITE !,"Checking ",Y
SET @(Y_"=$G("_Y_")")
+3 QUIT
MMCHK ;check XMGAPI4
+1 NEW X
+2 SET X="XMGAPI4"
XECUTE ^%ZOSF("TEST")
IF '$TEST
QUIT
+3 ;if exists, skip routine during load
+4 SET X=$$RTNUP^XPDUTL("XMGAPI4",2)
+5 QUIT
OS ;checks OS and skips all other ZU routines
+1 ;XUZURTN = ZU routine to save, checked in XUINPRE
+2 NEW X,XUNU,XUNU1,XUOS
+3 SET X=$GET(^%ZOSF("OS"))
SET XUOS="VXD^DTM^MSM^MSQ"
+4 FOR XUNU=1:1:4
SET XUNU1=X[$PIECE("DSM^DTM^MSM^M/SQL",U,XUNU)
IF XUNU1
QUIT
+5 IF 'XUNU1
QUIT
+6 FOR XUNU1=1:1:4
IF XUNU'=XUNU1
SET X=$$RTNUP^XPDUTL("ZU"_$PIECE(XUOS,U,XUNU1),2)
+7 SET XUZURTN="ZU"_$PIECE(XUOS,U,XUNU)
+8 QUIT