BNPOST11 ;IHS/OIT/ENM - ADD BNP ENVIRONMENT CHECK ROUTINE
;;1.0;NATIONAL SITE TRACKING SYSTEM;**1**;07/31/2009
;;1.0*1 11/1/2011;IHS/OIT/GAB ADDED CHECK FOR VERSION 1 INSTALLATION AND DUZ
I '$G(IOM) D HOME^%ZIS
I '$G(DUZ) W !,"DUZ UNDEFINED OR 0." D SORRY(2) Q
I '$L($G(DUZ(0))) W !,"DUZ(0) UNDEFINED OR NULL." D SORRY(2) Q
;CHECK FOR VERSION 1.0
S X=$$GET1^DIQ(200,DUZ,.01)
W !!,$$CJ^XLFSTR("Hello, "_$P(X,",",2)_" "_$P(X,","),IOM)
W !!,"Checking Environment for Version 1.0"
D VCHK
;
NEW IORVON,IORVOFF
S X="IORVON;IORVOFF"
D ENDR^%ZISS
Q
VCHK ; Check required version
NEW BNPV
S BNPRE="BNP"
S BNPV=$$VERSION^XPDUTL(BNPRE)
I BNPV'="1.0" W !,"You need at least version 1.0 before proceeding..." D SORRY(2) Q
I BNPV W !,"You have version 1.0 ... "
W !,"Continuing with installation ..."
D EX
Q
SORRY(X) ; Error display
KILL DIFQ
S XPDQUIT=X
W *7,!,$$CJ^XLFSTR("Sorry....FIX IT!",IOM)
Q
EX K DA,X,Y,BNPV,BNPRE Q
BNPOST11 ;IHS/OIT/ENM - ADD BNP ENVIRONMENT CHECK ROUTINE
+1 ;;1.0;NATIONAL SITE TRACKING SYSTEM;**1**;07/31/2009
+2 ;;1.0*1 11/1/2011;IHS/OIT/GAB ADDED CHECK FOR VERSION 1 INSTALLATION AND DUZ
+3 IF '$GET(IOM)
DO HOME^%ZIS
+4 IF '$GET(DUZ)
WRITE !,"DUZ UNDEFINED OR 0."
DO SORRY(2)
QUIT
+5 IF '$LENGTH($GET(DUZ(0)))
WRITE !,"DUZ(0) UNDEFINED OR NULL."
DO SORRY(2)
QUIT
+6 ;CHECK FOR VERSION 1.0
+7 SET X=$$GET1^DIQ(200,DUZ,.01)
+8 WRITE !!,$$CJ^XLFSTR("Hello, "_$PIECE(X,",",2)_" "_$PIECE(X,","),IOM)
+9 WRITE !!,"Checking Environment for Version 1.0"
+10 DO VCHK
+11 ;
+12 NEW IORVON,IORVOFF
+13 SET X="IORVON;IORVOFF"
+14 DO ENDR^%ZISS
+15 QUIT
VCHK ; Check required version
+1 NEW BNPV
+2 SET BNPRE="BNP"
+3 SET BNPV=$$VERSION^XPDUTL(BNPRE)
+4 IF BNPV'="1.0"
WRITE !,"You need at least version 1.0 before proceeding..."
DO SORRY(2)
QUIT
+5 IF BNPV
WRITE !,"You have version 1.0 ... "
+6 WRITE !,"Continuing with installation ..."
+7 DO EX
+8 QUIT
SORRY(X) ; Error display
+1 KILL DIFQ
+2 SET XPDQUIT=X
+3 WRITE *7,!,$$CJ^XLFSTR("Sorry....FIX IT!",IOM)
+4 QUIT
EX KILL DA,X,Y,BNPV,BNPRE
QUIT