VALMPP ; alb/mjk - Pre-Init for List Manager ;08:08 PM 30 Mar 1993
;;1;List Manager;;Aug 13, 1993
;
EN ; -- main entry point
D USER G ENQ:'$D(DIFQ)
D OERR G ENQ:'$D(DIFQ)
D XQOR
ENQ Q
;
USER I $S('($D(DUZ)#2):1,'$D(^VA(200,+DUZ,0)):1,'$D(DUZ(0)):1,DUZ(0)'="@":1,1:0) W !!?3,"The variable DUZ must be set to an active user code and the variable",!?3,"DUZ(0) must equal '@' to initialize.",! K DIFQ
Q
;
OERR ; -- is protocol file present
I '$D(^ORD(101)) D
.W !,">>> Protocol file not present in this account."
.D STOP
Q
;
XQOR ; -- Conditionally installs XQOR*
N DIF,X,XCNP,DIR,Y,X,VALMXQ
K ^UTILITY("VALMLOAD",$J) S VALMXQ=6.7
W !!,">>> Checking the version of XQOR*..."
S X="XQOR" X ^%ZOSF("TEST")
I $T S XCNP=0,DIF="^UTILITY(""VALMLOAD"",$J," X ^%ZOSF("LOAD")
S X=$G(^UTILITY("VALMLOAD",$J,2,0))
I $P(X,";",3)'<VALMXQ W "ok." G XQORQ
W !!?5,*7,"The current version of XQOR* is ",$P(X,";",3),"."
W !?5,"List Manager requires version ",VALMXQ," or greater.",!
W !?5,"As part of the post-init, version ",VALMXQ," will be installed."
S DIR(0)="Y",DIR("A")=" Continue with the installation",DIR("B")="No" D ^DIR K DIR
D:'Y STOP
K ^UTILITY("VALMLOAD",$J)
XQORQ Q
;
STOP ; -- set flag and write message
K DIFQ
W !!,*7,">>> List Manager installation will not occur."
Q
VALMPP ; alb/mjk - Pre-Init for List Manager ;08:08 PM 30 Mar 1993
+1 ;;1;List Manager;;Aug 13, 1993
+2 ;
EN ; -- main entry point
+1 DO USER
IF '$DATA(DIFQ)
GOTO ENQ
+2 DO OERR
IF '$DATA(DIFQ)
GOTO ENQ
+3 DO XQOR
ENQ QUIT
+1 ;
USER IF $SELECT('($DATA(DUZ)#2):1,'$DATA(^VA(200,+DUZ,0)):1,'$DATA(DUZ(0)):1,DUZ(0)'="@":1,1:0)
WRITE !!?3,"The variable DUZ must be set to an active user code and the variable",!?3,"DUZ(0) must equal '@' to initialize.",!
KILL DIFQ
+1 QUIT
+2 ;
OERR ; -- is protocol file present
+1 IF '$DATA(^ORD(101))
Begin DoDot:1
+2 WRITE !,">>> Protocol file not present in this account."
+3 DO STOP
End DoDot:1
+4 QUIT
+5 ;
XQOR ; -- Conditionally installs XQOR*
+1 NEW DIF,X,XCNP,DIR,Y,X,VALMXQ
+2 KILL ^UTILITY("VALMLOAD",$JOB)
SET VALMXQ=6.7
+3 WRITE !!,">>> Checking the version of XQOR*..."
+4 SET X="XQOR"
XECUTE ^%ZOSF("TEST")
+5 IF $TEST
SET XCNP=0
SET DIF="^UTILITY(""VALMLOAD"",$J,"
XECUTE ^%ZOSF("LOAD")
+6 SET X=$GET(^UTILITY("VALMLOAD",$JOB,2,0))
+7 IF $PIECE(X,";",3)'<VALMXQ
WRITE "ok."
GOTO XQORQ
+8 WRITE !!?5,*7,"The current version of XQOR* is ",$PIECE(X,";",3),"."
+9 WRITE !?5,"List Manager requires version ",VALMXQ," or greater.",!
+10 WRITE !?5,"As part of the post-init, version ",VALMXQ," will be installed."
+11 SET DIR(0)="Y"
SET DIR("A")=" Continue with the installation"
SET DIR("B")="No"
DO ^DIR
KILL DIR
+12 IF 'Y
DO STOP
+13 KILL ^UTILITY("VALMLOAD",$JOB)
XQORQ QUIT
+1 ;
STOP ; -- set flag and write message
+1 KILL DIFQ
+2 WRITE !!,*7,">>> List Manager installation will not occur."
+3 QUIT