IBD3KENV ;ALB/MLI - AICS 3.0 Environment Checker ; 4 OCT 1996
;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
EN ;entry point
W !,"AICS 3.0 Installation Requirements:",!
D ENV ; check environment
D PATCH ; check patches
D BLDCHK ; check build entries
W:$D(XPDABORT) !!,">>> Environment check failed. Installation will not be allowed."
W:'$D(XPDABORT) !!,">>> Environment is Ok"
Q
;
;
ENV ; check enviroment for KIDS/programmer variables
W !,">>> Checking Environment:"
I $G(XPDABORT) W !," Can not proceed. XPDABORT is inappropriately defined."
I +$G(DUZ)'>0!($G(DUZ(0))'="@")!($G(U)'="^")!('$D(DT)) D
. S XPDABORT=2
. W !,"You must first initialize Programmer Environment by running ^XUP",!
I '$G(XPDABORT) W !," Environment checks OK"
Q
;
;
PATCH ;check for required patches
N LINE,OK,PATCH
W !!,">>> Checking PACKAGE File Entries:"
F LINE=1:1 S PATCH=$P($T(LIST+LINE),";;",2) Q:(PATCH="QUIT") D
. W !," Checking for required patch ",PATCH,"..."
. S OK=$$PATCH^XPDUTL(PATCH)
. I 'OK S XPDABORT=2 W "not found!!"
. I OK W "OK"
Q
;
BLDCHK ;check build file entries
W !,">>> Checking BUILD File Entries:"
F IBX=1:1 S IBPATCH=$P($P($T(BUILD+IBX),";;",2),U,1) Q:'$L(IBPATCH) D
.W !,?5,IBPATCH
.IF '$D(^XPD(9.6,"B",IBPATCH)) D
..N IBPKG,IBVER
..S IBPKG=$P($P($T(BUILD+IBX),";;",2),U,2)
..S IBVER=$P($P($T(BUILD+IBX),";;",2),U,3)
..IF $$VERSION^XPDUTL(IBPKG)'=IBVER D
...S XPDABORT=2
...W !,"Missing Required Package File Entry (Package/Patch): ",IBPATCH
..ELSE D
...W " ...Ok - in Package File"
.ELSE D
..W " ...Ok"
LIST ;
;;XU*8.0*2
;;XU*8.0*15
;;XU*8.0*16
;;XU*8.0*28
;;XU*8.0*32
;;XU*8.0*44
;;QUIT
BUILD ;
;;PCE V1.0^PX^1.0
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBD3KENV 1747 printed Dec 13, 2024@01:38:42 Page 2
IBD3KENV ;ALB/MLI - AICS 3.0 Environment Checker ; 4 OCT 1996
+1 ;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
EN ;entry point
+1 WRITE !,"AICS 3.0 Installation Requirements:",!
+2 ; check environment
DO ENV
+3 ; check patches
DO PATCH
+4 ; check build entries
DO BLDCHK
+5 if $DATA(XPDABORT)
WRITE !!,">>> Environment check failed. Installation will not be allowed."
+6 if '$DATA(XPDABORT)
WRITE !!,">>> Environment is Ok"
+7 QUIT
+8 ;
+9 ;
ENV ; check enviroment for KIDS/programmer variables
+1 WRITE !,">>> Checking Environment:"
+2 IF $GET(XPDABORT)
WRITE !," Can not proceed. XPDABORT is inappropriately defined."
+3 IF +$GET(DUZ)'>0!($GET(DUZ(0))'="@")!($GET(U)'="^")!('$DATA(DT))
Begin DoDot:1
+4 SET XPDABORT=2
+5 WRITE !,"You must first initialize Programmer Environment by running ^XUP",!
End DoDot:1
+6 IF '$GET(XPDABORT)
WRITE !," Environment checks OK"
+7 QUIT
+8 ;
+9 ;
PATCH ;check for required patches
+1 NEW LINE,OK,PATCH
+2 WRITE !!,">>> Checking PACKAGE File Entries:"
+3 FOR LINE=1:1
SET PATCH=$PIECE($TEXT(LIST+LINE),";;",2)
if (PATCH="QUIT")
QUIT
Begin DoDot:1
+4 WRITE !," Checking for required patch ",PATCH,"..."
+5 SET OK=$$PATCH^XPDUTL(PATCH)
+6 IF 'OK
SET XPDABORT=2
WRITE "not found!!"
+7 IF OK
WRITE "OK"
End DoDot:1
+8 QUIT
+9 ;
BLDCHK ;check build file entries
+1 WRITE !,">>> Checking BUILD File Entries:"
+2 FOR IBX=1:1
SET IBPATCH=$PIECE($PIECE($TEXT(BUILD+IBX),";;",2),U,1)
if '$LENGTH(IBPATCH)
QUIT
Begin DoDot:1
+3 WRITE !,?5,IBPATCH
+4 IF '$DATA(^XPD(9.6,"B",IBPATCH))
Begin DoDot:2
+5 NEW IBPKG,IBVER
+6 SET IBPKG=$PIECE($PIECE($TEXT(BUILD+IBX),";;",2),U,2)
+7 SET IBVER=$PIECE($PIECE($TEXT(BUILD+IBX),";;",2),U,3)
+8 IF $$VERSION^XPDUTL(IBPKG)'=IBVER
Begin DoDot:3
+9 SET XPDABORT=2
+10 WRITE !,"Missing Required Package File Entry (Package/Patch): ",IBPATCH
End DoDot:3
+11 IF '$TEST
Begin DoDot:3
+12 WRITE " ...Ok - in Package File"
End DoDot:3
End DoDot:2
+13 IF '$TEST
Begin DoDot:2
+14 WRITE " ...Ok"
End DoDot:2
End DoDot:1
LIST ;
+1 ;;XU*8.0*2
+2 ;;XU*8.0*15
+3 ;;XU*8.0*16
+4 ;;XU*8.0*28
+5 ;;XU*8.0*32
+6 ;;XU*8.0*44
+7 ;;QUIT
BUILD ;
+1 ;;PCE V1.0^PX^1.0