AUT98P27 ; IHS/OIT/FBD - AUT V98.1 PATCH 27 ENVIRONMENT CHECKS AND POST-INIT PROCESS;
;;98.1;IHS DICTIONARIES (POINTERS);**27**;DEC 5,2014;Build 2
;
;
; The following line prevents the "Disable Options..." and "Move Routines..." questions from being asked during the install.
I $G(XPDENV)=1 S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
F X="XPO1","XPZ1","XPZ2","XPI1" S XPDDIQ(X)=0
;KERNEL
I +$$VERSION^XPDUTL("XU")<8 D MES^XPDUTL($$CJ^XLFSTR("Version 8.0 of KERNEL is required. Not installed",80)) D SORRY(2) I 1
E D MES^XPDUTL($$CJ^XLFSTR("Requires Kernel Version 8.0....Present.",80))
;FILEMAN
I +$$VERSION^XPDUTL("DI")<22 D MES^XPDUTL($$CJ^XLFSTR("Version 22.0 of FILEMAN is required. Not installed.",80)) D SORRY(2) I 1
E D MES^XPDUTL($$CJ^XLFSTR("Requires Fileman v22....Present.",80))
;AUT
I $$VERSION^XPDUTL("AUT")'="98.1" D MES^XPDUTL($$CJ^XLFSTR("Version 98.1 of the IHS DICTIONARIES (POINTERS) is required. Not installed",80)) D SORRY(2) I 1
E D MES^XPDUTL($$CJ^XLFSTR("Requires IHS DICTIONARIES (POINTERS) Version 98.1....Present.",80))
;AUT 98.1 PATCH 26
I '$$INSTALLD("AUT*98.1*26") D SORRY(2)
;
Q ;END OF ENVIRONMENT CHECK
;
;
PRE ;PATCH 27 PRE-INIT CHECKS AND PROCESSES
D MES^XPDUTL($$CJ^XLFSTR("Beginning AUT v98.1 patch 27 pre-init process.",80))
;
;
D MES^XPDUTL($$CJ^XLFSTR("AUT v98.1 patch 27 pre-init process complete.",80))
Q
;
;
POST ;PATCH 27 POST-INIT PROCESSES
D MES^XPDUTL($$CJ^XLFSTR("Beginning AUT v98.1 patch 27 post-init process.",80))
;
D BMES^XPDUTL("Delivering AUT*98.1*27 install message to select users...")
D MAIL
;
D MES^XPDUTL($$CJ^XLFSTR("AUT v98.1 patch 27 post-init process complete.",80))
Q
;
;
MAIL ;----- SEND INSTALL MAIL MESSAGE
;
N DIFROM,XMSUB,XMDUZ,XMTEXT,XMY
;
K ^TMP("AUTP27MS",$J)
S ^TMP("AUTP27MS",$J,1)=" --- AUT v 98.1 Patch 27 has been installed into this namespace ---"
S ^TMP("AUTP27MS",$J,2)=" "
I $G(XPDA) D
. S %=0
. F S %=$O(^XTMP("XPDI",XPDA,"BLD",XPDBLD,1,%)) Q:'% D
. . S ^TMP("AUTP27MS",$J,(%+2))=" "_^(%,0)
;
S XMSUB=$P($P($T(+1),";",2)," ",3,99)
S XMDUZ=$S($G(DUZ):DUZ,1:.5)
S XMTEXT="^TMP(""AUTP27MS"",$J,"
S XMY(1)=""
S XMY(DUZ)=""
;
F %="XUMGR","XUPROG","XUPROGMODE" D SINGLE(%)
D ^XMD
;
K ^TMP("AUTP27MS",$J)
Q
;
;
SINGLE(K) ;----- GET HOLDERS OF A SINGLE KEY K.
N Y
Q:'$D(^XUSEC(K))
S Y=0
F S Y=$O(^XUSEC(K,Y)) Q:'Y S XMY(Y)=""
Q
;
;
INSTALLD(AUTSTAL) ;EP - Determine if patch AUTSTAL was installed, where
; AUTSTAL is the name of the INSTALL. E.g "AG*6.0*11".
;
NEW AUTY,DIC,X,Y
S X=$P(AUTSTAL,"*",1)
S DIC="^DIC(9.4,",DIC(0)="FM",D="C"
D IX^DIC
I Y<1 D IMES Q 0
S DIC=DIC_+Y_",22,",X=$P(AUTSTAL,"*",2)
D ^DIC
I Y<1 D IMES Q 0
S DIC=DIC_+Y_",""PAH"",",X=$P(AUTSTAL,"*",3)
D ^DIC
S AUTY=Y
D IMES
Q $S(AUTY<1:0,1:1)
;
;
IMES ;
D MES^XPDUTL($$CJ^XLFSTR("Patch """_AUTSTAL_""" is"_$S(Y<1:" *NOT*",1:"")_" installed.",IOM))
Q
;
;
SORRY(X) ;
KILL DIFQ
I X=3 S XPDQUIT=2 Q
S XPDQUIT=X
W *7,!,$$CJ^XLFSTR("Sorry....FIX IT!",IOM)
Q
AUT98P27 ; IHS/OIT/FBD - AUT V98.1 PATCH 27 ENVIRONMENT CHECKS AND POST-INIT PROCESS;
+1 ;;98.1;IHS DICTIONARIES (POINTERS);**27**;DEC 5,2014;Build 2
+2 ;
+3 ;
+4 ; The following line prevents the "Disable Options..." and "Move Routines..." questions from being asked during the install.
+5 IF $GET(XPDENV)=1
SET (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
+6 FOR X="XPO1","XPZ1","XPZ2","XPI1"
SET XPDDIQ(X)=0
+7 ;KERNEL
+8 IF +$$VERSION^XPDUTL("XU")<8
DO MES^XPDUTL($$CJ^XLFSTR("Version 8.0 of KERNEL is required. Not installed",80))
DO SORRY(2)
IF 1
+9 IF '$TEST
DO MES^XPDUTL($$CJ^XLFSTR("Requires Kernel Version 8.0....Present.",80))
+10 ;FILEMAN
+11 IF +$$VERSION^XPDUTL("DI")<22
DO MES^XPDUTL($$CJ^XLFSTR("Version 22.0 of FILEMAN is required. Not installed.",80))
DO SORRY(2)
IF 1
+12 IF '$TEST
DO MES^XPDUTL($$CJ^XLFSTR("Requires Fileman v22....Present.",80))
+13 ;AUT
+14 IF $$VERSION^XPDUTL("AUT")'="98.1"
DO MES^XPDUTL($$CJ^XLFSTR("Version 98.1 of the IHS DICTIONARIES (POINTERS) is required. Not installed",80))
DO SORRY(2)
IF 1
+15 IF '$TEST
DO MES^XPDUTL($$CJ^XLFSTR("Requires IHS DICTIONARIES (POINTERS) Version 98.1....Present.",80))
+16 ;AUT 98.1 PATCH 26
+17 IF '$$INSTALLD("AUT*98.1*26")
DO SORRY(2)
+18 ;
+19 ;END OF ENVIRONMENT CHECK
QUIT
+20 ;
+21 ;
PRE ;PATCH 27 PRE-INIT CHECKS AND PROCESSES
+1 DO MES^XPDUTL($$CJ^XLFSTR("Beginning AUT v98.1 patch 27 pre-init process.",80))
+2 ;
+3 ;
+4 DO MES^XPDUTL($$CJ^XLFSTR("AUT v98.1 patch 27 pre-init process complete.",80))
+5 QUIT
+6 ;
+7 ;
POST ;PATCH 27 POST-INIT PROCESSES
+1 DO MES^XPDUTL($$CJ^XLFSTR("Beginning AUT v98.1 patch 27 post-init process.",80))
+2 ;
+3 DO BMES^XPDUTL("Delivering AUT*98.1*27 install message to select users...")
+4 DO MAIL
+5 ;
+6 DO MES^XPDUTL($$CJ^XLFSTR("AUT v98.1 patch 27 post-init process complete.",80))
+7 QUIT
+8 ;
+9 ;
MAIL ;----- SEND INSTALL MAIL MESSAGE
+1 ;
+2 NEW DIFROM,XMSUB,XMDUZ,XMTEXT,XMY
+3 ;
+4 KILL ^TMP("AUTP27MS",$JOB)
+5 SET ^TMP("AUTP27MS",$JOB,1)=" --- AUT v 98.1 Patch 27 has been installed into this namespace ---"
+6 SET ^TMP("AUTP27MS",$JOB,2)=" "
+7 IF $GET(XPDA)
Begin DoDot:1
+8 SET %=0
+9 FOR
SET %=$ORDER(^XTMP("XPDI",XPDA,"BLD",XPDBLD,1,%))
IF '%
QUIT
Begin DoDot:2
+10 SET ^TMP("AUTP27MS",$JOB,(%+2))=" "_^(%,0)
End DoDot:2
End DoDot:1
+11 ;
+12 SET XMSUB=$PIECE($PIECE($TEXT(+1),";",2)," ",3,99)
+13 SET XMDUZ=$SELECT($GET(DUZ):DUZ,1:.5)
+14 SET XMTEXT="^TMP(""AUTP27MS"",$J,"
+15 SET XMY(1)=""
+16 SET XMY(DUZ)=""
+17 ;
+18 FOR %="XUMGR","XUPROG","XUPROGMODE"
DO SINGLE(%)
+19 DO ^XMD
+20 ;
+21 KILL ^TMP("AUTP27MS",$JOB)
+22 QUIT
+23 ;
+24 ;
SINGLE(K) ;----- GET HOLDERS OF A SINGLE KEY K.
+1 NEW Y
+2 IF '$DATA(^XUSEC(K))
QUIT
+3 SET Y=0
+4 FOR
SET Y=$ORDER(^XUSEC(K,Y))
IF 'Y
QUIT
SET XMY(Y)=""
+5 QUIT
+6 ;
+7 ;
INSTALLD(AUTSTAL) ;EP - Determine if patch AUTSTAL was installed, where
+1 ; AUTSTAL is the name of the INSTALL. E.g "AG*6.0*11".
+2 ;
+3 NEW AUTY,DIC,X,Y
+4 SET X=$PIECE(AUTSTAL,"*",1)
+5 SET DIC="^DIC(9.4,"
SET DIC(0)="FM"
SET D="C"
+6 DO IX^DIC
+7 IF Y<1
DO IMES
QUIT 0
+8 SET DIC=DIC_+Y_",22,"
SET X=$PIECE(AUTSTAL,"*",2)
+9 DO ^DIC
+10 IF Y<1
DO IMES
QUIT 0
+11 SET DIC=DIC_+Y_",""PAH"","
SET X=$PIECE(AUTSTAL,"*",3)
+12 DO ^DIC
+13 SET AUTY=Y
+14 DO IMES
+15 QUIT $SELECT(AUTY<1:0,1:1)
+16 ;
+17 ;
IMES ;
+1 DO MES^XPDUTL($$CJ^XLFSTR("Patch """_AUTSTAL_""" is"_$SELECT(Y<1:" *NOT*",1:"")_" installed.",IOM))
+2 QUIT
+3 ;
+4 ;
SORRY(X) ;
+1 KILL DIFQ
+2 IF X=3
SET XPDQUIT=2
QUIT
+3 SET XPDQUIT=X
+4 WRITE *7,!,$$CJ^XLFSTR("Sorry....FIX IT!",IOM)
+5 QUIT