LR315 ;DALOI/KLL/CKA - LR*5.2*315 PATCH ENVIRONMENT CHECK ROUTINE ;09/21/07
;;5.2;LAB SERVICE;**315**;Sep 27, 1994;Build 25
EN ; Does not prevent loading of the transport global.
;
I '$G(XPDENV) D Q
.N XQA,XQAMSG,MSG
.S XQAMSG="Transport global for patch "_$G(XPDNM,"Unknown patch")
.S XQAMSG=XQAMSG_" loaded on "_$$HTE^XLFDT($H)
.S XQA("G.LMI")=""
.D SETUP^XQALERT
.S MSG="Sending transport global loaded alert to mail group G.LMI"
.D BMES^XPDUTL($$CJ^XLFSTR(MSG,80)) K MSG
;
D CHECK
I XPDENV S XPDDIQ("XPZ1","B")="YES"
D EXIT
Q
;
CHECK ; Perform environment check
;
I $S('$G(IOM):1,'$G(IOSL):1,$G(U)'="^":1,1:0) D Q
.D BMES^XPDUTL($$CJ^XLFSTR("Terminal Device is not defined",80))
.S XPDQUIT=2
;
I $S('$G(DUZ):1,$D(DUZ)[0:1,$D(DUZ(0))[0:1,1:0) D Q
.S MSG="Please log in to set local DUZ... variables"
.D BMES^XPDUTL($$CJ^XLFSTR(MSG,80)) K MSG
.S XPDQUIT=2
;
I '($$ACTIVE^XUSER(DUZ)) D Q
.S MSG="You are not a valid user on this system"
.D BMES^XPDUTL($$CJ^XLFSTR(MSG,80)) K MSG
.S XPDQUIT=2
S XQAMSG="Installation of patch "_$G(XPDNM,"Unknown patch")
S XQAMSG=XQAMSG_" started on "_$$HTE^XLFDT($H)
S XQA("G.LMI")=""
D SETUP^XQALERT
;
S MSG="Sending install started alert to mail group G.LMI"
D BMES^XPDUTL($$CJ^XLFSTR(MSG,80)) K MSG
;
;
;
Q
;
EXIT ;
I $G(XPDQUIT) D
.S MSG="--- Install Environment Check FAILED ---"
.D BMES^XPDUTL($$CJ^XLFSTR(MSG,80)) K MSG
I '$G(XPDQUIT) D
.D BMES^XPDUTL($$CJ^XLFSTR("--- Environment Check is Ok ---",80))
Q
;
PRE ; KIDS Pre install for LR*5.2*315
;
D BMES^XPDUTL($$CJ^XLFSTR("*** Pre install started ***",80))
D BMES^XPDUTL($$CJ^XLFSTR("*** Pre install completed ***",80))
;
Q
;
POST ; KIDS Post install for LR*5.2*315
;
N XQA,XQAMSG,MSG
D BMES^XPDUTL($$CJ^XLFSTR("*** Post install started ***",80))
;
D BMES^XPDUTL($$CJ^XLFSTR("*** Post install completed ***",80))
;
S XQAMSG="Installation of patch "_$G(XPDNM,"Unknown patch")
S XQAMSG=XQAMSG_" completed on "_$$HTE^XLFDT($H)
S XQA("G.LMI")=""
D SETUP^XQALERT
;
S MSG="Sending install completion alert to mail group G.LMI"
D BMES^XPDUTL($$CJ^XLFSTR(MSG,80)) K MSG
;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLR315 2207 printed Dec 13, 2024@02:03:44 Page 2
LR315 ;DALOI/KLL/CKA - LR*5.2*315 PATCH ENVIRONMENT CHECK ROUTINE ;09/21/07
+1 ;;5.2;LAB SERVICE;**315**;Sep 27, 1994;Build 25
EN ; Does not prevent loading of the transport global.
+1 ;
+2 IF '$GET(XPDENV)
Begin DoDot:1
+3 NEW XQA,XQAMSG,MSG
+4 SET XQAMSG="Transport global for patch "_$GET(XPDNM,"Unknown patch")
+5 SET XQAMSG=XQAMSG_" loaded on "_$$HTE^XLFDT($HOROLOG)
+6 SET XQA("G.LMI")=""
+7 DO SETUP^XQALERT
+8 SET MSG="Sending transport global loaded alert to mail group G.LMI"
+9 DO BMES^XPDUTL($$CJ^XLFSTR(MSG,80))
KILL MSG
End DoDot:1
QUIT
+10 ;
+11 DO CHECK
+12 IF XPDENV
SET XPDDIQ("XPZ1","B")="YES"
+13 DO EXIT
+14 QUIT
+15 ;
CHECK ; Perform environment check
+1 ;
+2 IF $SELECT('$GET(IOM):1,'$GET(IOSL):1,$GET(U)'="^":1,1:0)
Begin DoDot:1
+3 DO BMES^XPDUTL($$CJ^XLFSTR("Terminal Device is not defined",80))
+4 SET XPDQUIT=2
End DoDot:1
QUIT
+5 ;
+6 IF $SELECT('$GET(DUZ):1,$DATA(DUZ)[0:1,$DATA(DUZ(0))[0:1,1:0)
Begin DoDot:1
+7 SET MSG="Please log in to set local DUZ... variables"
+8 DO BMES^XPDUTL($$CJ^XLFSTR(MSG,80))
KILL MSG
+9 SET XPDQUIT=2
End DoDot:1
QUIT
+10 ;
+11 IF '($$ACTIVE^XUSER(DUZ))
Begin DoDot:1
+12 SET MSG="You are not a valid user on this system"
+13 DO BMES^XPDUTL($$CJ^XLFSTR(MSG,80))
KILL MSG
+14 SET XPDQUIT=2
End DoDot:1
QUIT
+15 SET XQAMSG="Installation of patch "_$GET(XPDNM,"Unknown patch")
+16 SET XQAMSG=XQAMSG_" started on "_$$HTE^XLFDT($HOROLOG)
+17 SET XQA("G.LMI")=""
+18 DO SETUP^XQALERT
+19 ;
+20 SET MSG="Sending install started alert to mail group G.LMI"
+21 DO BMES^XPDUTL($$CJ^XLFSTR(MSG,80))
KILL MSG
+22 ;
+23 ;
+24 ;
+25 QUIT
+26 ;
EXIT ;
+1 IF $GET(XPDQUIT)
Begin DoDot:1
+2 SET MSG="--- Install Environment Check FAILED ---"
+3 DO BMES^XPDUTL($$CJ^XLFSTR(MSG,80))
KILL MSG
End DoDot:1
+4 IF '$GET(XPDQUIT)
Begin DoDot:1
+5 DO BMES^XPDUTL($$CJ^XLFSTR("--- Environment Check is Ok ---",80))
End DoDot:1
+6 QUIT
+7 ;
PRE ; KIDS Pre install for LR*5.2*315
+1 ;
+2 DO BMES^XPDUTL($$CJ^XLFSTR("*** Pre install started ***",80))
+3 DO BMES^XPDUTL($$CJ^XLFSTR("*** Pre install completed ***",80))
+4 ;
+5 QUIT
+6 ;
POST ; KIDS Post install for LR*5.2*315
+1 ;
+2 NEW XQA,XQAMSG,MSG
+3 DO BMES^XPDUTL($$CJ^XLFSTR("*** Post install started ***",80))
+4 ;
+5 DO BMES^XPDUTL($$CJ^XLFSTR("*** Post install completed ***",80))
+6 ;
+7 SET XQAMSG="Installation of patch "_$GET(XPDNM,"Unknown patch")
+8 SET XQAMSG=XQAMSG_" completed on "_$$HTE^XLFDT($HOROLOG)
+9 SET XQA("G.LMI")=""
+10 DO SETUP^XQALERT
+11 ;
+12 SET MSG="Sending install completion alert to mail group G.LMI"
+13 DO BMES^XPDUTL($$CJ^XLFSTR(MSG,80))
KILL MSG
+14 ;
+15 QUIT