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

XUZP7ENV.m

Go to the documentation of this file.
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