AUGCMP ; COMPARES GLOBAL TREES [ 02/16/88 10:11 AM ]
; CREATED BY GIS 7/17/85 FOR MSM UNIX MUMPS (2.3)
S:'$D(AUGSTOP) AUGSTOP="I 0"
D SEARCH K AUGP,AUGS,AUGSTOP Q
SEARCH ;
N (AUGP,AUGS,AUGSTOP)
S T="T",C=",",P=")",NT=$L(AUGP,C)-1,L=1,T1=""
S TT=AUGP F I=1:1:30 S TT=TT_T_I_C
EXTR S X=T_L,Y=$P(TT,C,1,L+NT)_P,@X=$O(@Y)
X AUGSTOP Q:$T
I @X'="" D:$D(@(Y))#2 SUB S L=L+1,@(T_L)="" G EXTR
S L=L-1 Q:L=0 G EXTR
SUB W "." S ZZ=AUGS_$P(Y,AUGP,2)
I '$D(@ZZ) W !,ZZ," does not exist" Q
I @ZZ'=@Y W !,ZZ," not same as ",Y Q
Q
AUGCMP ; COMPARES GLOBAL TREES [ 02/16/88 10:11 AM ]
+1 ; CREATED BY GIS 7/17/85 FOR MSM UNIX MUMPS (2.3)
+2 IF '$DATA(AUGSTOP)
SET AUGSTOP="I 0"
+3 DO SEARCH
KILL AUGP,AUGS,AUGSTOP
QUIT
SEARCH ;
+1 NEW (AUGP,AUGS,AUGSTOP)
+2 SET T="T"
SET C=","
SET P=")"
SET NT=$LENGTH(AUGP,C)-1
SET L=1
SET T1=""
+3 SET TT=AUGP
FOR I=1:1:30
SET TT=TT_T_I_C
EXTR SET X=T_L
SET Y=$PIECE(TT,C,1,L+NT)_P
SET @X=$ORDER(@Y)
+1 XECUTE AUGSTOP
IF $TEST
QUIT
+2 IF @X'=""
IF $DATA(@(Y))#2
DO SUB
SET L=L+1
SET @(T_L)=""
GOTO EXTR
+3 SET L=L-1
IF L=0
QUIT
GOTO EXTR
SUB WRITE "."
SET ZZ=AUGS_$PIECE(Y,AUGP,2)
+1 IF '$DATA(@ZZ)
WRITE !,ZZ," does not exist"
QUIT
+2 IF @ZZ'=@Y
WRITE !,ZZ," not same as ",Y
QUIT
+3 QUIT