ENARX11 ;(WASH ISC)/SAW/DH-WORK ORDER ARCHIVE ;3-28-93
;;7.0;ENGINEERING;;Aug 17, 1993
S DIFQ=0 W "THIS VERSION OF 'ENARX11' WAS CREATED ON JAN 25,1991",! D VERSION^DINIT I VERSION<17 W "BUT I NEED VERSION 17 OF THE VA FILEMAN!" G Q
W ?9,"(","AT AEMS Development"," BY VA FileMan V.17.32)",!,"TO SET UP FOR YOU THE FOLLOWING FILE:",! F I=1:1:1 D 1
G Q:DIFQ I $D(^DD("VERSION")),^("VERSION")'<17 G GO:$O(^("VERSION",17))="" W !,"BUT I'M OBSOLETE!!" G Q
W !,"FIRST, I'LL FRESHEN UP YOUR VA FILEMAN...." D N^DINIT
GO D ^ENARX12 G Q:'$D(DIFQ) S DIK(0)="B"
F DIF=1:1:1 S %=$T(IXF+DIF),DIK=$P(%,";",6),N=$P(%,";",3),D=$P(%,";",4)_U_N S:$D(^DIC(+N,0))[0 ^(0)=D S X=$D(@(DIK_"0)")),^(0)=D_U_$S(X#2:$P(^(0),U,3,9),1:U) I '$D(DIFQ(+N)),$P(%,";",5)!'X D IXALL^DIK:$O(^(0))>0 W "."
S DIFROM=0 D ^ENARX13,^ENARX14
L W !,*7,"OK, I'M DONE.",!,"NO"_$P("TE THAT FILE",U,DSEC)_" SECURITY-CODE PROTECTION HAS BEEN MADE" S:$D(DIFROM(0)) ^DIC(9.4,DIFROM(0),"VERSION")=DIFROM G Q^DIFROM0
;
1 S X=$T(IXF+I),N=+$P(X,";",3),N(N)=$P(X,";",4),D=$P(X,";",5),S=$P(X,";",6),U="^" W !?3,N,?13,N(N),$P(" (PARTIAL DEFINITION)",U,$P(X,";",7)),$P(" (INCLUDING DATA)",I,D)
S Z=$S($D(^DIC(N,0))#2:^(0),1:"") I $L($P(Z,N(N),1)) W *7,!,"***BUT YOU'VE ALREADY GOT '",$P(Z,"^",1),"' AS FILE #",N,"!***" S DIFQ=1 Q
S %=$P(S,"(",1),DW=0 S:$D(@%)#2 DW=@% S @%=DW
I $L(Z) W *7,!,"NOTE -- YOU ALREADY HAVE '",$P(Z,"^",1),"' FILE" S DIFQ(0)=1
I D,@("$O("_S_"0))>0") W " WITH DATA",!?9,"WANT MY DATA ADDED IN TO YOURS" S %=1 D YN^DICN S:%=2 DIFQ(N)=1 D OV:D-1&(%=1) I %<1 S DIFQ=1 Q
W ! Q
OV W !?9,*7,"I WILL **REPLACE** YOUR DATA WITH MINE, OK" D YN^DICN S:%=1 DIFQR(N)=1 Q
Q W *7,!!,"NO UPDATING HAS OCCURRED!"
;
IXF ;;ENARX1
;;6919.1;WO ARCHIVE;0;^ENAR(6919.1,;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENARY11 1758 printed Oct 16, 2024@17:52:32 Page 2
ENARX11 ;(WASH ISC)/SAW/DH-WORK ORDER ARCHIVE ;3-28-93
+1 ;;7.0;ENGINEERING;;Aug 17, 1993
+2 SET DIFQ=0
WRITE "THIS VERSION OF 'ENARX11' WAS CREATED ON JAN 25,1991",!
DO VERSION^DINIT
IF VERSION<17
WRITE "BUT I NEED VERSION 17 OF THE VA FILEMAN!"
GOTO Q
+3 WRITE ?9,"(","AT AEMS Development"," BY VA FileMan V.17.32)",!,"TO SET UP FOR YOU THE FOLLOWING FILE:",!
FOR I=1:1:1
DO 1
+4 if DIFQ
GOTO Q
IF $DATA(^DD("VERSION"))
IF ^("VERSION")'<17
if $ORDER(^("VERSION",17))=""
GOTO GO
WRITE !,"BUT I'M OBSOLETE!!"
GOTO Q
+5 WRITE !,"FIRST, I'LL FRESHEN UP YOUR VA FILEMAN...."
DO N^DINIT
GO DO ^ENARX12
if '$DATA(DIFQ)
GOTO Q
SET DIK(0)="B"
+1 FOR DIF=1:1:1
SET %=$TEXT(IXF+DIF)
SET DIK=$PIECE(%,";",6)
SET N=$PIECE(%,";",3)
SET D=$PIECE(%,";",4)_U_N
if $DATA(^DIC(+N,0))[0
SET ^(0)=D
SET X=$DATA(@(DIK_"0)"))
SET ^(0)=D_U_$SELECT(X#2:$PIECE(^(0),U,3,9),1:U)
IF '$DATA(DIFQ(+N))
IF $PIECE(%,";",5)!'X
if $ORDER(^(0))>0
DO IXALL^DIK
WRITE "."
+2 SET DIFROM=0
DO ^ENARX13
DO ^ENARX14
+3 LOCK
WRITE !,*7,"OK, I'M DONE.",!,"NO"_$PIECE("TE THAT FILE",U,DSEC)_" SECURITY-CODE PROTECTION HAS BEEN MADE"
if $DATA(DIFROM(0))
SET ^DIC(9.4,DIFROM(0),"VERSION")=DIFROM
GOTO Q^DIFROM0
+4 ;
1 SET X=$TEXT(IXF+I)
SET N=+$PIECE(X,";",3)
SET N(N)=$PIECE(X,";",4)
SET D=$PIECE(X,";",5)
SET S=$PIECE(X,";",6)
SET U="^"
WRITE !?3,N,?13,N(N),$PIECE(" (PARTIAL DEFINITION)",U,$PIECE(X,";",7)),$PIECE(" (INCLUDING DATA)",I,D)
+1 SET Z=$SELECT($DATA(^DIC(N,0))#2:^(0),1:"")
IF $LENGTH($PIECE(Z,N(N),1))
WRITE *7,!,"***BUT YOU'VE ALREADY GOT '",$PIECE(Z,"^",1),"' AS FILE #",N,"!***"
SET DIFQ=1
QUIT
+2 SET %=$PIECE(S,"(",1)
SET DW=0
if $DATA(@%)#2
SET DW=@%
SET @%=DW
+3 IF $LENGTH(Z)
WRITE *7,!,"NOTE -- YOU ALREADY HAVE '",$PIECE(Z,"^",1),"' FILE"
SET DIFQ(0)=1
+4 IF D
IF @("$O("_S_"0))>0")
WRITE " WITH DATA",!?9,"WANT MY DATA ADDED IN TO YOURS"
SET %=1
DO YN^DICN
if %=2
SET DIFQ(N)=1
if D-1&(%=1)
DO OV
IF %<1
SET DIFQ=1
QUIT
+5 WRITE !
QUIT
OV WRITE !?9,*7,"I WILL **REPLACE** YOUR DATA WITH MINE, OK"
DO YN^DICN
if %=1
SET DIFQR(N)=1
QUIT
Q WRITE *7,!!,"NO UPDATING HAS OCCURRED!"
+1 ;
IXF ;;ENARX1
+1 ;;6919.1;WO ARCHIVE;0;^ENAR(6919.1,;