LEX2103 ;ISL/KER - LEX*2.0*103 Env Check ;05/23/2017
;;2.0;LEXICON UTILITY;**103**;Sep 23, 1996;Build 2
;
; Global Variables
; None
;
; External References
; FIND^DIC ICR 2051
; $$IENS^DILF ICR 2054
; EN^DIQ1 ICR 10015
; $$FMTE^XLFDT ICR 10103
; $$PATCH^XPDUTL ICR 10141
; $$PKG^XPDUTL ICR 10141
; $$VERSION^XPDUTL ICR 10141
; $$VER^XPDUTL ICR 10141
; BMES^XPDUTL ICR 10141
; MES^XPDUTL ICR 10141
;
; Local Variables NEWed or KILLed by Kernel Installation
; and Distribution System (KIDS):
;
; XPDABORT,XPDDIQ,XPDQUIT
;
; see Kernel Developer Guide, Chapter 14,
; KIDS Developer Tools, Advanced Build Techniques
;
ENV ; Environment Check
N LEXPTYPE,LEXLREV,LEXREQP,LEXBUILD,LEXIGHF,LEXFY,LEXQTR,LEXG,LEXB,LEXE,LEXR,LEXSTR,LEXOK D IMP
K XPDDIQ("XPZ1","B"),XPDDIQ("XPI1","B") S XPDDIQ("XPZ1","B")="NO",XPDDIQ("XPI1","B")="NO",XPDNOQUE=1
S LEXSTR=$G(LEXPTYPE) S:$L($G(LEXFY))&($L($G(LEXQTR))) LEXSTR=LEXSTR_" for "_$G(LEXFY)_" "_$G(LEXQTR)_" Quarter"
D BM(LEXSTR)
S U="^"
; No user
D:+($$UR)'>0 ET("User not defined (DUZ)")
; No IO
D:+($$SY)'>0 ET("Undefined IO variable(s)")
I $D(LEXE) D ABRT Q
; XPDENV = 0 Environment Check during Load
; Check Version (2.0)
I $$VERSION^XPDUTL("LEX")'="2.0" D D ABRT Q
. D ET("Version 2.0 not found. Please install Lexicon Utility v 2.0")
N LEXOK,LEXG,LEXR,LEXB
; Check Required Patches
D:$O(LEXREQP(0))'>0 IMP I $O(LEXREQP(0))>0 D
. W ! N LEXPAT,LEXI,LEXPN,LEXP,LEXR,LEXC,LEXO,LEXC1,LEXC2,LEXC3,LEXC4,LEX
. S (LEXR,LEXC)=0 S LEXC1=3,LEXC2=24,LEXC3=27,LEXC4=41
. S LEXI=0 F S LEXI=$O(LEXREQP(LEXI)) Q:+LEXI'>0 D
. . S LEXC=LEXC+1,LEXPAT=$G(LEXREQP(LEXI))
. S LEXI=0 F S LEXI=$O(LEXREQP(LEXI)) Q:+LEXI'>0 D
. . N LEXPAT,LEXREL,LEXINS,LEXCOM,LEXPAR,LEXINE,LEXREQ,LEXTX S LEXREQ=$G(LEXREQP(LEXI))
. . S LEXPAT=$P(LEXREQ,"^",1),LEXREL=$P(LEXREQ,"^",2),LEXCOM=$P(LEXREQ,"^",3)
. . S LEXPN=$$INS(LEXPAT),LEXINS=$$INSD(LEXPAT),LEXINE=$P(LEXINS,"^",2),LEXPAR=""
. . S:LEXPN'>0&('$L(LEXINE)) LEXINE=" ?? "
. . I LEXI=1 D
. . . W !,?LEXC1,"Checking for ",!
. . . W !,?LEXC1,"Patch",?LEXC2,"",?LEXC3,"Installed",?LEXC4,"Content"
. . S LEXTX=$J(" ",LEXC1)_LEXPAT
. . S LEXTX=LEXTX_$J(" ",(LEXC2-$L(LEXTX)))
. . S LEXTX=LEXTX_$J(" ",(LEXC3-$L(LEXTX)))
. . I +LEXPN>0 D
. . . S LEXO=+($G(LEXO))+1 S:$L($G(LEXINE)) LEXTX=LEXTX_LEXINE
. . . S LEXTX=LEXTX_$J(" ",(LEXC4-$L(LEXTX)))
. . . S:$L(LEXCOM) LEXTX=LEXTX_LEXCOM
. . I +LEXPN'>0,$L(LEXINE) S LEXTX=LEXTX_LEXINE
. . D M(LEXTX)
. . I +LEXPN'>0 D
. . . N LEXP I LEXPAT["VA FileMan",$L(LEXPAR) D Q
. . . . S LEXP=$G(LEXPAT) S:LEXP[" SEQ"&($L($P(LEXP," SEQ",1))) LEXP=$P(LEXP," SEQ",1)
. . . . D ET((LEXP_LEXPAR_" not found, please install "_LEXP)),ET("before continuing")
. . . S LEXP=$G(LEXPAT) S:LEXP[" SEQ"&($L($P(LEXP," SEQ",1))) LEXP=$P(LEXP," SEQ",1)
. . . D ET((LEXP_" not found, please install "_LEXP_" before continuing"))
. W:+($G(LEXO))'=LEXC !
I $D(LEXE) D ABRT Q
I '$D(LEXFULL)&(+($G(XPDENV))'=1) D QUIT Q
QUIT ; Quit Passed Environment Check
K LEXFULL D OK
Q
ABRT ; Abort Failed Environment Check, KILL the distribution
D:$D(LEXE) ED S XPDABORT=1,XPDQUIT=1 S:$L($G(LEXBUILD)) XPDQUIT(LEXBUILD)=1
K LEXE,LEXFULL
Q
T1 ; Environment Check #1 (for testing only)
K XPDENV D ENV
Q
T2 ; Environment Check #2 (for testing only)
N XPDENV S XPDENV=1 D ENV
Q
;
; Error Checks/Messages
INS(X) ; Installed
N LEX,LEXP,LEXV,LEXI,LEXS S LEX=$P($G(X)," ",1) I $L(LEX,"*")=3 S X=$$PATCH^XPDUTL(LEX) Q X
S LEXP=$$PKG^XPDUTL(LEX),LEXV=$$VER^XPDUTL(LEX),LEXI=$$VERSION^XPDUTL(LEXP)
Q:+LEXV>0&(LEXV=LEXI) 1
Q 0
INSD(X) ; Installed on
N DA,LEX,LEXDA,LEXE,LEXI,LEXMSG,LEXNS,LEXOUT,LEXPI,LEXPN,LEXSCR,LEXVI,LEXVD,LEXVI,LEXVR S LEX=$G(X)
S LEXNS=$$PKG^XPDUTL(LEX),LEXVR=$$VER^XPDUTL(LEX),LEXPN=$P(X,"*",3)
Q:'$L(LEXNS) "" S LEXVR=+LEXVR Q:LEXVR'>0 "" S LEXPN=+LEXPN S:LEXVR'["." LEXVR=LEXVR_".0"
S LEXSCR="I $G(^DIC(9.4,+($G(Y)),""VERSION""))="""_LEXVR_""""
D FIND^DIC(9.4,,.01,"O",LEXNS,10,"C",LEXSCR,,"LEXOUT","LEXMSG")
S LEXPI=$G(LEXOUT("DILIST",2,1)) K LEXOUT,LEXMSG Q:+LEXPI'>0 "" Q:'$D(@("^DIC(9.4,"_LEXPI_",22)")) ""
K DA S DA(1)=LEXPI S LEXDA=$$IENS^DILF(.DA)
D FIND^DIC(9.49,LEXDA,".01;1I;2I","O",LEXVR,10,"B",,,"LEXOUT","LEXMSG")
S LEXVD=$G(LEXOUT("DILIST","ID",1,2)) I $E(LEXVD,1,7)?7N&(+LEXPN'>0) D Q X
. S X=$E(LEXVD,1,7)_"^"_$TR($$FMTE^XLFDT($E(LEXVD,1,7),"5DZ"),"@"," ")
S:$E(LEXVD,1,7)'?7N LEXVD=$G(LEXOUT("DILIST","ID",1,1)) I $E(LEXVD,1,7)?7N&(+LEXPN'>0) D Q X
. S X=$E(LEXVD,1,7)_"^"_$TR($$FMTE^XLFDT($E(LEXVD,1,7),"5DZ"),"@"," ")
Q:+LEXPN'>0 "" S LEXVI=$G(LEXOUT("DILIST",2,1)) K LEXOUT,LEXMSG
Q:+LEXVI'>0 "" Q:'$D(@("^DIC(9.4,"_LEXPI_",22,"_LEXVI_",""PAH"")")) ""
K DA S DA(2)=LEXPI,DA(1)=LEXVI S LEXDA=$$IENS^DILF(.DA)
S LEXSCR="I $G(^DIC(9.4,"_LEXPI_",22,"_LEXVI_",""PAH"",+($G(Y)),0))[""SEQ #"""
D FIND^DIC(9.4901,LEXDA,".01;.02I",,LEXPN,10,"B",LEXSCR,,"LEXOUT","LEXMSG")
S LEXI=$G(LEXOUT("DILIST","ID",1,.02)) I '$L(LEXI) D
. S LEXSCR="" D FIND^DIC(9.4901,LEXDA,".01;.02I",,LEXPN,10,"B",LEXSCR,,"LEXOUT","LEXMSG")
. S LEXI=$G(LEXOUT("DILIST","ID",1,.02))
Q:'$L(LEXI) "" Q:$P(LEXI,".",1)'?7N "" S LEXE=$TR($$FMTE^XLFDT(LEXI,"5DZ"),"@"," ")
Q:'$L(LEXE) "" S X=LEXI_"^"_LEXE
Q X
SY(X) ; Check System variables
Q:'$D(IO)!('$D(IOF))!('$D(IOM))!('$D(ION))!('$D(IOSL))!('$D(IOST)) 0
Q 1
UR(X) ; Check User variables
Q:'$L($G(DUZ(0))) 0
Q:+($G(DUZ))=0!($$NOTDEF(+$G(DUZ))) 0
Q 1
ET(X) ; Error Text
N LEXI S LEXI=+($G(LEXE(0))),LEXI=LEXI+1,LEXE(LEXI)=" "_$G(X),LEXE(0)=LEXI
Q
ED ; Error Display
N LEXI S LEXI=0 F S LEXI=$O(LEXE(LEXI)) Q:+LEXI=0 D M(LEXE(LEXI))
D M(" ") K LEXE Q
;
; Miscellaneous
NOTDEF(IEN) ; Check to see if user is defined
N DA,DR,DIQ,LEX,DIC S DA=IEN,DR=.01,DIC=200,DIQ="LEX" D EN^DIQ1 Q '$D(LEX)
OK ; Environment is OK
N LEXPTYPE,LEXLREV,LEXREQP,LEXBUILD,LEXIGHF,LEXFY,LEXQTR,LEXT
D IMP S LEXT=" Environment "_$S($L(LEXBUILD):("for patch/build "_LEXBUILD_" "),1:"")_"is ok"
D BM(LEXT),M(" ")
Q
BM(X) ; Blank Line with Message
S X=$G(X) S:$E(X,1)'=" " X=" "_X D BMES^XPDUTL(X) Q
M(X) ; Message
S X=$G(X) S:$E(X,1)'=" " X=" "_X D MES^XPDUTL(X) Q
TRIM(X) ; Trim Spaces
S X=$G(X) F Q:$E(X,1)'=" " S X=$E(X,2,$L(X))
F Q:$E(X,$L(X))'=" " S X=$E(X,1,($L(X)-1))
Q X
IMP ; Import names
N XPDABORT,XPDDIQ,XPDQUIT,XPDNOQUE
S LEXPTYPE="Code Set SDM Ticket Fixes"
S LEXPTYPE="Code Set Update"
S LEXPTYPE="Lexicon Defect/DD Fixes"
; Revision
S LEXLREV=103
; Required Builds Array
; LEX(1)=build SEQ #^released date^subject
; LEX(n)=build SEQ #^released date^subject
S LEXREQP(1)="LEX*2.0*86 SEQ #90^3150225^Data Dictionary/APIs Fixes"
S LEXREQP(2)="LEX*2.0*111 SEQ #101^3170522^Code Set FY17 3rd Qtr"
S LEXREQP(3)="DI*22.2*3 SEQ #2^3161011^VA FileMan 22.2 Defects"
; This Build Name
S LEXBUILD="LEX*2.0*103"
; This Build's Export Global Host Filename
S LEXIGHF=""
; Fiscal Year
S LEXFY=""
; Quarter
S LEXQTR=""
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLEX2103 7368 printed Dec 13, 2024@02:05:21 Page 2
LEX2103 ;ISL/KER - LEX*2.0*103 Env Check ;05/23/2017
+1 ;;2.0;LEXICON UTILITY;**103**;Sep 23, 1996;Build 2
+2 ;
+3 ; Global Variables
+4 ; None
+5 ;
+6 ; External References
+7 ; FIND^DIC ICR 2051
+8 ; $$IENS^DILF ICR 2054
+9 ; EN^DIQ1 ICR 10015
+10 ; $$FMTE^XLFDT ICR 10103
+11 ; $$PATCH^XPDUTL ICR 10141
+12 ; $$PKG^XPDUTL ICR 10141
+13 ; $$VERSION^XPDUTL ICR 10141
+14 ; $$VER^XPDUTL ICR 10141
+15 ; BMES^XPDUTL ICR 10141
+16 ; MES^XPDUTL ICR 10141
+17 ;
+18 ; Local Variables NEWed or KILLed by Kernel Installation
+19 ; and Distribution System (KIDS):
+20 ;
+21 ; XPDABORT,XPDDIQ,XPDQUIT
+22 ;
+23 ; see Kernel Developer Guide, Chapter 14,
+24 ; KIDS Developer Tools, Advanced Build Techniques
+25 ;
ENV ; Environment Check
+1 NEW LEXPTYPE,LEXLREV,LEXREQP,LEXBUILD,LEXIGHF,LEXFY,LEXQTR,LEXG,LEXB,LEXE,LEXR,LEXSTR,LEXOK
DO IMP
+2 KILL XPDDIQ("XPZ1","B"),XPDDIQ("XPI1","B")
SET XPDDIQ("XPZ1","B")="NO"
SET XPDDIQ("XPI1","B")="NO"
SET XPDNOQUE=1
+3 SET LEXSTR=$GET(LEXPTYPE)
if $LENGTH($GET(LEXFY))&($LENGTH($GET(LEXQTR)))
SET LEXSTR=LEXSTR_" for "_$GET(LEXFY)_" "_$GET(LEXQTR)_" Quarter"
+4 DO BM(LEXSTR)
+5 SET U="^"
+6 ; No user
+7 if +($$UR)'>0
DO ET("User not defined (DUZ)")
+8 ; No IO
+9 if +($$SY)'>0
DO ET("Undefined IO variable(s)")
+10 IF $DATA(LEXE)
DO ABRT
QUIT
+11 ; XPDENV = 0 Environment Check during Load
+12 ; Check Version (2.0)
+13 IF $$VERSION^XPDUTL("LEX")'="2.0"
Begin DoDot:1
+14 DO ET("Version 2.0 not found. Please install Lexicon Utility v 2.0")
End DoDot:1
DO ABRT
QUIT
+15 NEW LEXOK,LEXG,LEXR,LEXB
+16 ; Check Required Patches
+17 if $ORDER(LEXREQP(0))'>0
DO IMP
IF $ORDER(LEXREQP(0))>0
Begin DoDot:1
+18 WRITE !
NEW LEXPAT,LEXI,LEXPN,LEXP,LEXR,LEXC,LEXO,LEXC1,LEXC2,LEXC3,LEXC4,LEX
+19 SET (LEXR,LEXC)=0
SET LEXC1=3
SET LEXC2=24
SET LEXC3=27
SET LEXC4=41
+20 SET LEXI=0
FOR
SET LEXI=$ORDER(LEXREQP(LEXI))
if +LEXI'>0
QUIT
Begin DoDot:2
+21 SET LEXC=LEXC+1
SET LEXPAT=$GET(LEXREQP(LEXI))
End DoDot:2
+22 SET LEXI=0
FOR
SET LEXI=$ORDER(LEXREQP(LEXI))
if +LEXI'>0
QUIT
Begin DoDot:2
+23 NEW LEXPAT,LEXREL,LEXINS,LEXCOM,LEXPAR,LEXINE,LEXREQ,LEXTX
SET LEXREQ=$GET(LEXREQP(LEXI))
+24 SET LEXPAT=$PIECE(LEXREQ,"^",1)
SET LEXREL=$PIECE(LEXREQ,"^",2)
SET LEXCOM=$PIECE(LEXREQ,"^",3)
+25 SET LEXPN=$$INS(LEXPAT)
SET LEXINS=$$INSD(LEXPAT)
SET LEXINE=$PIECE(LEXINS,"^",2)
SET LEXPAR=""
+26 if LEXPN'>0&('$LENGTH(LEXINE))
SET LEXINE=" ?? "
+27 IF LEXI=1
Begin DoDot:3
+28 WRITE !,?LEXC1,"Checking for ",!
+29 WRITE !,?LEXC1,"Patch",?LEXC2,"",?LEXC3,"Installed",?LEXC4,"Content"
End DoDot:3
+30 SET LEXTX=$JUSTIFY(" ",LEXC1)_LEXPAT
+31 SET LEXTX=LEXTX_$JUSTIFY(" ",(LEXC2-$LENGTH(LEXTX)))
+32 SET LEXTX=LEXTX_$JUSTIFY(" ",(LEXC3-$LENGTH(LEXTX)))
+33 IF +LEXPN>0
Begin DoDot:3
+34 SET LEXO=+($GET(LEXO))+1
if $LENGTH($GET(LEXINE))
SET LEXTX=LEXTX_LEXINE
+35 SET LEXTX=LEXTX_$JUSTIFY(" ",(LEXC4-$LENGTH(LEXTX)))
+36 if $LENGTH(LEXCOM)
SET LEXTX=LEXTX_LEXCOM
End DoDot:3
+37 IF +LEXPN'>0
IF $LENGTH(LEXINE)
SET LEXTX=LEXTX_LEXINE
+38 DO M(LEXTX)
+39 IF +LEXPN'>0
Begin DoDot:3
+40 NEW LEXP
IF LEXPAT["VA FileMan"
IF $LENGTH(LEXPAR)
Begin DoDot:4
+41 SET LEXP=$GET(LEXPAT)
if LEXP[" SEQ"&($LENGTH($PIECE(LEXP," SEQ",1)))
SET LEXP=$PIECE(LEXP," SEQ",1)
+42 DO ET((LEXP_LEXPAR_" not found, please install "_LEXP))
DO ET("before continuing")
End DoDot:4
QUIT
+43 SET LEXP=$GET(LEXPAT)
if LEXP[" SEQ"&($LENGTH($PIECE(LEXP," SEQ",1)))
SET LEXP=$PIECE(LEXP," SEQ",1)
+44 DO ET((LEXP_" not found, please install "_LEXP_" before continuing"))
End DoDot:3
End DoDot:2
+45 if +($GET(LEXO))'=LEXC
WRITE !
End DoDot:1
+46 IF $DATA(LEXE)
DO ABRT
QUIT
+47 IF '$DATA(LEXFULL)&(+($GET(XPDENV))'=1)
DO QUIT
QUIT
QUIT ; Quit Passed Environment Check
+1 KILL LEXFULL
DO OK
+2 QUIT
ABRT ; Abort Failed Environment Check, KILL the distribution
+1 if $DATA(LEXE)
DO ED
SET XPDABORT=1
SET XPDQUIT=1
if $LENGTH($GET(LEXBUILD))
SET XPDQUIT(LEXBUILD)=1
+2 KILL LEXE,LEXFULL
+3 QUIT
T1 ; Environment Check #1 (for testing only)
+1 KILL XPDENV
DO ENV
+2 QUIT
T2 ; Environment Check #2 (for testing only)
+1 NEW XPDENV
SET XPDENV=1
DO ENV
+2 QUIT
+3 ;
+4 ; Error Checks/Messages
INS(X) ; Installed
+1 NEW LEX,LEXP,LEXV,LEXI,LEXS
SET LEX=$PIECE($GET(X)," ",1)
IF $LENGTH(LEX,"*")=3
SET X=$$PATCH^XPDUTL(LEX)
QUIT X
+2 SET LEXP=$$PKG^XPDUTL(LEX)
SET LEXV=$$VER^XPDUTL(LEX)
SET LEXI=$$VERSION^XPDUTL(LEXP)
+3 if +LEXV>0&(LEXV=LEXI)
QUIT 1
+4 QUIT 0
INSD(X) ; Installed on
+1 NEW DA,LEX,LEXDA,LEXE,LEXI,LEXMSG,LEXNS,LEXOUT,LEXPI,LEXPN,LEXSCR,LEXVI,LEXVD,LEXVI,LEXVR
SET LEX=$GET(X)
+2 SET LEXNS=$$PKG^XPDUTL(LEX)
SET LEXVR=$$VER^XPDUTL(LEX)
SET LEXPN=$PIECE(X,"*",3)
+3 if '$LENGTH(LEXNS)
QUIT ""
SET LEXVR=+LEXVR
if LEXVR'>0
QUIT ""
SET LEXPN=+LEXPN
if LEXVR'["."
SET LEXVR=LEXVR_".0"
+4 SET LEXSCR="I $G(^DIC(9.4,+($G(Y)),""VERSION""))="""_LEXVR_""""
+5 DO FIND^DIC(9.4,,.01,"O",LEXNS,10,"C",LEXSCR,,"LEXOUT","LEXMSG")
+6 SET LEXPI=$GET(LEXOUT("DILIST",2,1))
KILL LEXOUT,LEXMSG
if +LEXPI'>0
QUIT ""
if '$DATA(@("^DIC(9.4,"_LEXPI_",22)"))
QUIT ""
+7 KILL DA
SET DA(1)=LEXPI
SET LEXDA=$$IENS^DILF(.DA)
+8 DO FIND^DIC(9.49,LEXDA,".01;1I;2I","O",LEXVR,10,"B",,,"LEXOUT","LEXMSG")
+9 SET LEXVD=$GET(LEXOUT("DILIST","ID",1,2))
IF $EXTRACT(LEXVD,1,7)?7N&(+LEXPN'>0)
Begin DoDot:1
+10 SET X=$EXTRACT(LEXVD,1,7)_"^"_$TRANSLATE($$FMTE^XLFDT($EXTRACT(LEXVD,1,7),"5DZ"),"@"," ")
End DoDot:1
QUIT X
+11 if $EXTRACT(LEXVD,1,7)'?7N
SET LEXVD=$GET(LEXOUT("DILIST","ID",1,1))
IF $EXTRACT(LEXVD,1,7)?7N&(+LEXPN'>0)
Begin DoDot:1
+12 SET X=$EXTRACT(LEXVD,1,7)_"^"_$TRANSLATE($$FMTE^XLFDT($EXTRACT(LEXVD,1,7),"5DZ"),"@"," ")
End DoDot:1
QUIT X
+13 if +LEXPN'>0
QUIT ""
SET LEXVI=$GET(LEXOUT("DILIST",2,1))
KILL LEXOUT,LEXMSG
+14 if +LEXVI'>0
QUIT ""
if '$DATA(@("^DIC(9.4,"_LEXPI_",22,"_LEXVI_",""PAH"")"))
QUIT ""
+15 KILL DA
SET DA(2)=LEXPI
SET DA(1)=LEXVI
SET LEXDA=$$IENS^DILF(.DA)
+16 SET LEXSCR="I $G(^DIC(9.4,"_LEXPI_",22,"_LEXVI_",""PAH"",+($G(Y)),0))[""SEQ #"""
+17 DO FIND^DIC(9.4901,LEXDA,".01;.02I",,LEXPN,10,"B",LEXSCR,,"LEXOUT","LEXMSG")
+18 SET LEXI=$GET(LEXOUT("DILIST","ID",1,.02))
IF '$LENGTH(LEXI)
Begin DoDot:1
+19 SET LEXSCR=""
DO FIND^DIC(9.4901,LEXDA,".01;.02I",,LEXPN,10,"B",LEXSCR,,"LEXOUT","LEXMSG")
+20 SET LEXI=$GET(LEXOUT("DILIST","ID",1,.02))
End DoDot:1
+21 if '$LENGTH(LEXI)
QUIT ""
if $PIECE(LEXI,".",1)'?7N
QUIT ""
SET LEXE=$TRANSLATE($$FMTE^XLFDT(LEXI,"5DZ"),"@"," ")
+22 if '$LENGTH(LEXE)
QUIT ""
SET X=LEXI_"^"_LEXE
+23 QUIT X
SY(X) ; Check System variables
+1 if '$DATA(IO)!('$DATA(IOF))!('$DATA(IOM))!('$DATA(ION))!('$DATA(IOSL))!('$DATA(IOST))
QUIT 0
+2 QUIT 1
UR(X) ; Check User variables
+1 if '$LENGTH($GET(DUZ(0)))
QUIT 0
+2 if +($GET(DUZ))=0!($$NOTDEF(+$GET(DUZ)))
QUIT 0
+3 QUIT 1
ET(X) ; Error Text
+1 NEW LEXI
SET LEXI=+($GET(LEXE(0)))
SET LEXI=LEXI+1
SET LEXE(LEXI)=" "_$GET(X)
SET LEXE(0)=LEXI
+2 QUIT
ED ; Error Display
+1 NEW LEXI
SET LEXI=0
FOR
SET LEXI=$ORDER(LEXE(LEXI))
if +LEXI=0
QUIT
DO M(LEXE(LEXI))
+2 DO M(" ")
KILL LEXE
QUIT
+3 ;
+4 ; Miscellaneous
NOTDEF(IEN) ; Check to see if user is defined
+1 NEW DA,DR,DIQ,LEX,DIC
SET DA=IEN
SET DR=.01
SET DIC=200
SET DIQ="LEX"
DO EN^DIQ1
QUIT '$DATA(LEX)
OK ; Environment is OK
+1 NEW LEXPTYPE,LEXLREV,LEXREQP,LEXBUILD,LEXIGHF,LEXFY,LEXQTR,LEXT
+2 DO IMP
SET LEXT=" Environment "_$SELECT($LENGTH(LEXBUILD):("for patch/build "_LEXBUILD_" "),1:"")_"is ok"
+3 DO BM(LEXT)
DO M(" ")
+4 QUIT
BM(X) ; Blank Line with Message
+1 SET X=$GET(X)
if $EXTRACT(X,1)'=" "
SET X=" "_X
DO BMES^XPDUTL(X)
QUIT
M(X) ; Message
+1 SET X=$GET(X)
if $EXTRACT(X,1)'=" "
SET X=" "_X
DO MES^XPDUTL(X)
QUIT
TRIM(X) ; Trim Spaces
+1 SET X=$GET(X)
FOR
if $EXTRACT(X,1)'=" "
QUIT
SET X=$EXTRACT(X,2,$LENGTH(X))
+2 FOR
if $EXTRACT(X,$LENGTH(X))'=" "
QUIT
SET X=$EXTRACT(X,1,($LENGTH(X)-1))
+3 QUIT X
IMP ; Import names
+1 NEW XPDABORT,XPDDIQ,XPDQUIT,XPDNOQUE
+2 SET LEXPTYPE="Code Set SDM Ticket Fixes"
+3 SET LEXPTYPE="Code Set Update"
+4 SET LEXPTYPE="Lexicon Defect/DD Fixes"
+5 ; Revision
+6 SET LEXLREV=103
+7 ; Required Builds Array
+8 ; LEX(1)=build SEQ #^released date^subject
+9 ; LEX(n)=build SEQ #^released date^subject
+10 SET LEXREQP(1)="LEX*2.0*86 SEQ #90^3150225^Data Dictionary/APIs Fixes"
+11 SET LEXREQP(2)="LEX*2.0*111 SEQ #101^3170522^Code Set FY17 3rd Qtr"
+12 SET LEXREQP(3)="DI*22.2*3 SEQ #2^3161011^VA FileMan 22.2 Defects"
+13 ; This Build Name
+14 SET LEXBUILD="LEX*2.0*103"
+15 ; This Build's Export Global Host Filename
+16 SET LEXIGHF=""
+17 ; Fiscal Year
+18 SET LEXFY=""
+19 ; Quarter
+20 SET LEXQTR=""
+21 QUIT