- XUINOK ;SFISC/RWF - CHECK TO SEE IF OK TO LOAD ;06/02/95 12:23
- ;;8.0;KERNEL;;Jul 10, 1995
- N Y
- 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
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXUINOK 1852 printed Feb 18, 2025@23:36:09 Page 2
- XUINOK ;SFISC/RWF - CHECK TO SEE IF OK TO LOAD ;06/02/95 12:23
- +1 ;;8.0;KERNEL;;Jul 10, 1995
- +2 NEW Y
- +3 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
- +4 ;
- +5 WRITE !,"I'm checking to see if it is OK to install KERNEL v",$PIECE($TEXT(+2),";",3)," in this account.",!
- +6 WRITE !!,"Checking the %ZOSV routine"
- DO GETENV^%ZOSV
- +7 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
- +8 ;must have Kernel 7.1
- +9 SET Y=$$VERSION^XPDUTL("XU")
- if Y&(Y<7.1)
- GOTO OLD
- +10 ;during Install, check global access,MM routine, and OS
- +11 ;XPDDIQ = don't ask DISABLE OPTIONS question
- +12 ;XPDNOQUE = not to allow queueing during install
- +13 IF $GET(XPDENV)
- DO GBLOK
- DO MMCHK
- DO OS
- SET XPDDIQ("XPZ1")=0
- SET XPDNOQUE=1
- +14 if $GET(XPDQUIT)
- QUIT
- +15 WRITE !!,"Everything looks OK, Lets continue.",!
- +16 +17 QUIT
- +18 ;
- 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