XUZP7ENV ;IHS/OIRM/DSD/AEF - PATCH XU*8.0*1007 ENVIRONMENT CHECK ROUTINE [ 04/04/2003 8:45 AM ]
;;8.0;KERNEL;**1007**;APR 1, 2003
;
EN ;EP -- MAIN ENTRY POINT
;
D ^XBKVAR
K XPDQUIT
D PARTSZ
D DUZ
D NOQUE
D KERVER
D NOASK
D TM
D ACT
;D XPDIJ
D QUIT
Q
PARTSZ ;----- SET PARTITION SIZE TO MAXIMUM
;
I $$VERSION^%ZOSV(1)["MSM" D
. V 108:$J:256*1024:4
Q
DUZ ;----- CHECK FOR VALID DUZ
;
I '$L($P($G(^VA(200,+$G(DUZ),0)),U)) D
. D BMES^XPDUTL("YOUR DUZ IS NOT SET TO A VALID DUZ")
. S XPDQUIT=2
Q:$G(XPDQUIT)
S DUZ(0)="@"
Q
NOQUE ;----- SET NOQUEUE FLAG
;
Q:$G(XPDQUIT)
S XPDNOQUE=1 ;DO NOT QUEUE
Q
KERVER ;----- CHECK KERNEL VERSION FOR VERSION 8
;
I +$$VERSION^XPDUTL("XU")'=8 D
. D BMES^XPDUTL("YOU ARE RUNNING VERSION "_$$VERSION^XPDUTL("XU")_" OF KERNEL")
. D BMES^XPDUTL("YOU MUST BE RUNNING VERSION 8.0")
. D BMES^XPDUTL("THIS DISTRIBUTION CANNOT BE INSTALLED")
. S XPDQUIT=2
Q
NOASK ;----- SUPPRESS ASK 'DISABLE OPTS','MOVE ROUTINES' PROMPTS
;
S XPDDIQ("XPZ1")=0 ;'DISABLE OPTIONS' SET DEFAULT TO 'NO' & NOT ASK
S XPDDIQ("XPZ2")=0 ;'MOVE ROUTINES' SET DEFAULT TO 'NO' & NOT ASK
Q
TM ;----- CHECK IF TASKMAN IS RUNNING
;
I $D(^%ZTSCH("RUN")) D
. D BMES^XPDUTL("IT APPEARS THAT TASKMAN IS RUNNING")
. D BMES^XPDUTL("YOU MUST SHUT DOWN TASKMAN BEFORE INSTALLING THIS DISTRIBUTION")
. S XPDQUIT=2
F I=1:1:12 W "." H 1
Q
ACT ;----- CHANGE ACTION IN TRANSPORT GLOBAL
;CHANGES ACTION TO SKIP (2) IN THE TRANSPORT GLOBAL FOR XPDIJ* ROUTINES
;
N I,X,XPDA,Y
Q:$G(XPDQUIT)
Q:'$G(XPDENV)
F I=1007,81,95,108,124,68,44 D
. S X="XU*8.0*"_I
. S Y=+$$PCHLU^XUZP7ENV(X)
. Q:Y'>0
. S XPDA=+Y
. Q:'$D(^XTMP("XPDI",XPDA,"RTN","XPDIJ"))
. S $P(^XTMP("XPDI",XPDA,"RTN","XPDIJ"),U)=2
F I=1007,108,200,68 D
. S X="XU*8.0*"_I
. S Y=+$$PCHLU^XUZP7ENV(X)
. Q:Y'>0
. S XPDA=+Y
. Q:'$D(^XTMP("XPDI",XPDA,"RTN","XPDIJ1"))
. S $P(^XTMP("XPDI",XPDA,"RTN","XPDIJ1"),U)=2
Q
XPDIJ ;----- INSTALL XPDIJ, XPDIJ1, ROUTINES NOW TO PREVENT <CLOBR> ERROR
;
N DIE,X,XCN,XPDA,XPDIJ,Y
Q:$G(XPDQUIT)
Q:'$G(XPDENV)
S Y=$$PCHLU^XUZP7ENV("XU*8.0*1007")
Q:+Y'>0
S XPDIJ=+Y
F X="XPDIJ","XPDIJ1" D
. S XPDA=XPDIJ
. S DIE="^XTMP(""XPDI"",XPDIJ,""RTN"","_""""_X_""""_","
. S XCN=0
. X ^%ZOSF("SAVE")
. S XCN=$$RTNUP^XPDUTL(X,2)
Q
PCHLU(X) ;----- PATCH LOOKUP IN INSTALL FILE
;
N DIC,Y
S DIC="^XPD(9.7,"
S DIC(0)=""
D ^DIC
Q Y
QUIT ;----- ISSUE MESSAGES
;
I $G(XPDQUIT) D
. D BMES^XPDUTL("INSTALL ABORTED!")
I '$G(XPDQUIT) D
. D BMES^XPDUTL("EVERYTHING LOOKS OK")
Q
XUZP7ENV ;IHS/OIRM/DSD/AEF - PATCH XU*8.0*1007 ENVIRONMENT CHECK ROUTINE [ 04/04/2003 8:45 AM ]
+1 ;;8.0;KERNEL;**1007**;APR 1, 2003
+2 ;
EN ;EP -- MAIN ENTRY POINT
+1 ;
+2 DO ^XBKVAR
+3 KILL XPDQUIT
+4 DO PARTSZ
+5 DO DUZ
+6 DO NOQUE
+7 DO KERVER
+8 DO NOASK
+9 DO TM
+10 DO ACT
+11 ;D XPDIJ
+12 DO QUIT
+13 QUIT
PARTSZ ;----- SET PARTITION SIZE TO MAXIMUM
+1 ;
+2 IF $$VERSION^%ZOSV(1)["MSM"
Begin DoDot:1
+3 VIEW 108:$JOB:256*1024:4
End DoDot:1
+4 QUIT
DUZ ;----- CHECK FOR VALID DUZ
+1 ;
+2 IF '$LENGTH($PIECE($GET(^VA(200,+$GET(DUZ),0)),U))
Begin DoDot:1
+3 DO BMES^XPDUTL("YOUR DUZ IS NOT SET TO A VALID DUZ")
+4 SET XPDQUIT=2
End DoDot:1
+5 IF $GET(XPDQUIT)
QUIT
+6 SET DUZ(0)="@"
+7 QUIT
NOQUE ;----- SET NOQUEUE FLAG
+1 ;
+2 IF $GET(XPDQUIT)
QUIT
+3 ;DO NOT QUEUE
SET XPDNOQUE=1
+4 QUIT
KERVER ;----- CHECK KERNEL VERSION FOR VERSION 8
+1 ;
+2 IF +$$VERSION^XPDUTL("XU")'=8
Begin DoDot:1
+3 DO BMES^XPDUTL("YOU ARE RUNNING VERSION "_$$VERSION^XPDUTL("XU")_" OF KERNEL")
+4 DO BMES^XPDUTL("YOU MUST BE RUNNING VERSION 8.0")
+5 DO BMES^XPDUTL("THIS DISTRIBUTION CANNOT BE INSTALLED")
+6 SET XPDQUIT=2
End DoDot:1
+7 QUIT
NOASK ;----- SUPPRESS ASK 'DISABLE OPTS','MOVE ROUTINES' PROMPTS
+1 ;
+2 ;'DISABLE OPTIONS' SET DEFAULT TO 'NO' & NOT ASK
SET XPDDIQ("XPZ1")=0
+3 ;'MOVE ROUTINES' SET DEFAULT TO 'NO' & NOT ASK
SET XPDDIQ("XPZ2")=0
+4 QUIT
TM ;----- CHECK IF TASKMAN IS RUNNING
+1 ;
+2 IF $DATA(^%ZTSCH("RUN"))
Begin DoDot:1
+3 DO BMES^XPDUTL("IT APPEARS THAT TASKMAN IS RUNNING")
+4 DO BMES^XPDUTL("YOU MUST SHUT DOWN TASKMAN BEFORE INSTALLING THIS DISTRIBUTION")
+5 SET XPDQUIT=2
End DoDot:1
+6 FOR I=1:1:12
WRITE "."
HANG 1
+7 QUIT
ACT ;----- CHANGE ACTION IN TRANSPORT GLOBAL
+1 ;CHANGES ACTION TO SKIP (2) IN THE TRANSPORT GLOBAL FOR XPDIJ* ROUTINES
+2 ;
+3 NEW I,X,XPDA,Y
+4 IF $GET(XPDQUIT)
QUIT
+5 IF '$GET(XPDENV)
QUIT
+6 FOR I=1007,81,95,108,124,68,44
Begin DoDot:1
+7 SET X="XU*8.0*"_I
+8 SET Y=+$$PCHLU^XUZP7ENV(X)
+9 IF Y'>0
QUIT
+10 SET XPDA=+Y
+11 IF '$DATA(^XTMP("XPDI",XPDA,"RTN","XPDIJ"))
QUIT
+12 SET $PIECE(^XTMP("XPDI",XPDA,"RTN","XPDIJ"),U)=2
End DoDot:1
+13 FOR I=1007,108,200,68
Begin DoDot:1
+14 SET X="XU*8.0*"_I
+15 SET Y=+$$PCHLU^XUZP7ENV(X)
+16 IF Y'>0
QUIT
+17 SET XPDA=+Y
+18 IF '$DATA(^XTMP("XPDI",XPDA,"RTN","XPDIJ1"))
QUIT
+19 SET $PIECE(^XTMP("XPDI",XPDA,"RTN","XPDIJ1"),U)=2
End DoDot:1
+20 QUIT
XPDIJ ;----- INSTALL XPDIJ, XPDIJ1, ROUTINES NOW TO PREVENT <CLOBR> ERROR
+1 ;
+2 NEW DIE,X,XCN,XPDA,XPDIJ,Y
+3 IF $GET(XPDQUIT)
QUIT
+4 IF '$GET(XPDENV)
QUIT
+5 SET Y=$$PCHLU^XUZP7ENV("XU*8.0*1007")
+6 IF +Y'>0
QUIT
+7 SET XPDIJ=+Y
+8 FOR X="XPDIJ","XPDIJ1"
Begin DoDot:1
+9 SET XPDA=XPDIJ
+10 SET DIE="^XTMP(""XPDI"",XPDIJ,""RTN"","_""""_X_""""_","
+11 SET XCN=0
+12 XECUTE ^%ZOSF("SAVE")
+13 SET XCN=$$RTNUP^XPDUTL(X,2)
End DoDot:1
+14 QUIT
PCHLU(X) ;----- PATCH LOOKUP IN INSTALL FILE
+1 ;
+2 NEW DIC,Y
+3 SET DIC="^XPD(9.7,"
+4 SET DIC(0)=""
+5 DO ^DIC
+6 QUIT Y
QUIT ;----- ISSUE MESSAGES
+1 ;
+2 IF $GET(XPDQUIT)
Begin DoDot:1
+3 DO BMES^XPDUTL("INSTALL ABORTED!")
End DoDot:1
+4 IF '$GET(XPDQUIT)
Begin DoDot:1
+5 DO BMES^XPDUTL("EVERYTHING LOOKS OK")
End DoDot:1
+6 QUIT