ES1P46E ;PHOENIX/KLD - Patch ES*1*46 Environment check; 5/13/09 3:22 PM
;;1.0;POLICE & SECURITY;**46**;May 8.2009;Build 12
ST N DIC,X,Y S DIC="^DIC(9.4,",DIC(0)="M",X="POLICE & SECURITY" D ^DIC
I Y<1 D AB(1) Q
;Now check if 3 options exist
S DIC="^DIC(19,",X="ESP ACTIVITY ADD/EDIT" D ^DIC I Y<1 D AB(2) Q
S X="ESP ADD JOURNAL ENTRY" D ^DIC I Y<1 D AB(2) Q
S X="ESP CAR POOL AVAILABILITY" D ^DIC I Y<1 D AB(2) Q
;Now check if 2 routines exist
S X="ESPVAL" X ^%ZOSF("TEST") I '$T D AB(3) Q
S X="ESPVEH" X ^%ZOSF("TEST") I '$T D AB(3) Q
Q
;
AB(X) W !!,"Aborting install - Police ",$P("package^options^routines",U,X)," not present!"
S XPDQUIT=1 Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HES1P46E 672 printed Dec 13, 2024@02:29:25 Page 2
ES1P46E ;PHOENIX/KLD - Patch ES*1*46 Environment check; 5/13/09 3:22 PM
+1 ;;1.0;POLICE & SECURITY;**46**;May 8.2009;Build 12
ST NEW DIC,X,Y
SET DIC="^DIC(9.4,"
SET DIC(0)="M"
SET X="POLICE & SECURITY"
DO ^DIC
+1 IF Y<1
DO AB(1)
QUIT
+2 ;Now check if 3 options exist
+3 SET DIC="^DIC(19,"
SET X="ESP ACTIVITY ADD/EDIT"
DO ^DIC
IF Y<1
DO AB(2)
QUIT
+4 SET X="ESP ADD JOURNAL ENTRY"
DO ^DIC
IF Y<1
DO AB(2)
QUIT
+5 SET X="ESP CAR POOL AVAILABILITY"
DO ^DIC
IF Y<1
DO AB(2)
QUIT
+6 ;Now check if 2 routines exist
+7 SET X="ESPVAL"
XECUTE ^%ZOSF("TEST")
IF '$TEST
DO AB(3)
QUIT
+8 SET X="ESPVEH"
XECUTE ^%ZOSF("TEST")
IF '$TEST
DO AB(3)
QUIT
+9 QUIT
+10 ;
AB(X) WRITE !!,"Aborting install - Police ",$PIECE("package^options^routines",U,X)," not present!"
+1 SET XPDQUIT=1
QUIT