A1B2PRE ;ALB/MJK - ODS PRE-INIT Version 1.5; 14 JAN 1991
;;Version 1.55 (local for MAS v5 sites);;
;
EN ; -- pre-init entry point
D REL,DD:$D(DIFQ)
Q
;
REL ; -- check if version 1 was loaded
;
F A1B2PKG=0:0 S A1B2PKG=+$O(^DIC(9.4,"C","A1B2",A1B2PKG)) Q:'A1B2PKG I $D(^DIC(9.4,A1B2PKG,0)),$P(^(0),U)="OPERATION DESERT SHIELD" Q
I '$D(^DIC(9.4,A1B2PKG,0)) D MES G RELQ
I $S('$D(^DIC(9.4,A1B2PKG,"VERSION")):1,1:+^("VERSION")<1) D MES G RELQ
RELQ K A1B2PKG Q
;
MES ; -- error message
W !!,*7,"You must load version 1 of 'OPERATION DESERT SHIELD' package first."
W !!,"Initialization aborted." K DIFQ
Q
;
DD ; -- del 11500.2
W !,">>> Deleting ODS ADMISSIONS file data dictionary..."
S DIU=11500.2,DIU(0)="" D EN^DIU2 K DIU
W !," Data dictionary will be restored by inits."
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HA1B2PRE 821 printed Dec 13, 2024@02:21:22 Page 2
A1B2PRE ;ALB/MJK - ODS PRE-INIT Version 1.5; 14 JAN 1991
+1 ;;Version 1.55 (local for MAS v5 sites);;
+2 ;
EN ; -- pre-init entry point
+1 DO REL
if $DATA(DIFQ)
DO DD
+2 QUIT
+3 ;
REL ; -- check if version 1 was loaded
+1 ;
+2 FOR A1B2PKG=0:0
SET A1B2PKG=+$ORDER(^DIC(9.4,"C","A1B2",A1B2PKG))
if 'A1B2PKG
QUIT
IF $DATA(^DIC(9.4,A1B2PKG,0))
IF $PIECE(^(0),U)="OPERATION DESERT SHIELD"
QUIT
+3 IF '$DATA(^DIC(9.4,A1B2PKG,0))
DO MES
GOTO RELQ
+4 IF $SELECT('$DATA(^DIC(9.4,A1B2PKG,"VERSION")):1,1:+^("VERSION")<1)
DO MES
GOTO RELQ
RELQ KILL A1B2PKG
QUIT
+1 ;
MES ; -- error message
+1 WRITE !!,*7,"You must load version 1 of 'OPERATION DESERT SHIELD' package first."
+2 WRITE !!,"Initialization aborted."
KILL DIFQ
+3 QUIT
+4 ;
DD ; -- del 11500.2
+1 WRITE !,">>> Deleting ODS ADMISSIONS file data dictionary..."
+2 SET DIU=11500.2
SET DIU(0)=""
DO EN^DIU2
KILL DIU
+3 WRITE !," Data dictionary will be restored by inits."
+4 QUIT
+5 ;