LR326 ;VA/DALOI/FHS - LR*5.2*326 PATCH ENVIRONMENT CHECK ROUTINE;31 -AUG-2001
;;5.2;LAB SERVICE;**1030**;NOV 01, 1997
;;5.2;LAB SERVICE;**326**;Sep 27,1994
Q
ENV ; Does not prevent loading of the transport global.
; Environment check is done only during the install.
;
N XQA,XQAMSG
;
CHKNM ; Make sure the patch name exist
I '$D(XPDNM) D G EXIT
. D BMES("No valid patch name exist")
. S XPDQUIT=2
;
D CHECK
D EXIT
Q
;
CHECK ; Perform environment check
I $S('$G(IOM):1,'$G(IOSL):1,$G(U)'="^":1,1:0) D
. D BMES("Terminal Device is not defined")
. S XPDQUIT=2
I $S('$G(DUZ):1,$D(DUZ)[0:1,$D(DUZ(0))[0:1,1:0) D
. D BMES("Please log in to set local DUZ... variables")
. S XPDQUIT=2
I $P($$ACTIVE^XUSER(DUZ),"^")'=1 D
. D BMES("You are not a valid user on this system")
. S XPDQUIT=2
S XPDIQ("XPZ1","B")="NO"
Q
;
EXIT ;
N XQA
I $G(XPDQUIT) D BMES("--- Install Environment Check FAILED ---") Q
D BMES("--- Environment Check is Ok ---")
S XQAMSG="Loading of patch "_$G(XPDNM,"Unknown patch")_" completed on "_$$HTE^XLFDT($H)
; D BMES("Sending install loaded alert to mail group G.LMI")
; S XQA("G.LMI")=""
; D SETUP^XQALERT
Q
POST ;Post Install
N XQA
I $G(XPDQUIT) D BMES("--- Install FAILED ---") Q
D BMES("--- Install completed ---")
S XQAMSG="Install of patch "_$G(XPDNM,"Unknown patch")_" completed on "_$$HTE^XLFDT($H)
; D BMES("Sending install complete alert to mail group G.LMI")
; S XQA("G.LMI")=""
; D SETUP^XQALERT
Q
BMES(STR) ;Write BMES^XPDUTL statements
D BMES^XPDUTL($$CJ^XLFSTR(STR,IOM))
Q
LR326 ;VA/DALOI/FHS - LR*5.2*326 PATCH ENVIRONMENT CHECK ROUTINE;31 -AUG-2001
+1 ;;5.2;LAB SERVICE;**1030**;NOV 01, 1997
+2 ;;5.2;LAB SERVICE;**326**;Sep 27,1994
+3 QUIT
ENV ; Does not prevent loading of the transport global.
+1 ; Environment check is done only during the install.
+2 ;
+3 NEW XQA,XQAMSG
+4 ;
CHKNM ; Make sure the patch name exist
+1 IF '$DATA(XPDNM)
Begin DoDot:1
+2 DO BMES("No valid patch name exist")
+3 SET XPDQUIT=2
End DoDot:1
GOTO EXIT
+4 ;
+5 DO CHECK
+6 DO EXIT
+7 QUIT
+8 ;
CHECK ; Perform environment check
+1 IF $SELECT('$GET(IOM):1,'$GET(IOSL):1,$GET(U)'="^":1,1:0)
Begin DoDot:1
+2 DO BMES("Terminal Device is not defined")
+3 SET XPDQUIT=2
End DoDot:1
+4 IF $SELECT('$GET(DUZ):1,$DATA(DUZ)[0:1,$DATA(DUZ(0))[0:1,1:0)
Begin DoDot:1
+5 DO BMES("Please log in to set local DUZ... variables")
+6 SET XPDQUIT=2
End DoDot:1
+7 IF $PIECE($$ACTIVE^XUSER(DUZ),"^")'=1
Begin DoDot:1
+8 DO BMES("You are not a valid user on this system")
+9 SET XPDQUIT=2
End DoDot:1
+10 SET XPDIQ("XPZ1","B")="NO"
+11 QUIT
+12 ;
EXIT ;
+1 NEW XQA
+2 IF $GET(XPDQUIT)
DO BMES("--- Install Environment Check FAILED ---")
QUIT
+3 DO BMES("--- Environment Check is Ok ---")
+4 SET XQAMSG="Loading of patch "_$GET(XPDNM,"Unknown patch")_" completed on "_$$HTE^XLFDT($HOROLOG)
+5 ; D BMES("Sending install loaded alert to mail group G.LMI")
+6 ; S XQA("G.LMI")=""
+7 ; D SETUP^XQALERT
+8 QUIT
POST ;Post Install
+1 NEW XQA
+2 IF $GET(XPDQUIT)
DO BMES("--- Install FAILED ---")
QUIT
+3 DO BMES("--- Install completed ---")
+4 SET XQAMSG="Install of patch "_$GET(XPDNM,"Unknown patch")_" completed on "_$$HTE^XLFDT($HOROLOG)
+5 ; D BMES("Sending install complete alert to mail group G.LMI")
+6 ; S XQA("G.LMI")=""
+7 ; D SETUP^XQALERT
+8 QUIT
BMES(STR) ;Write BMES^XPDUTL statements
+1 DO BMES^XPDUTL($$CJ^XLFSTR(STR,IOM))
+2 QUIT