[613] | 1 | ZTGS ;SF/RWF - GLOBAL SEARCH ;12/6/89 14:01 ;
|
---|
| 2 | ;;7.3;TOOLKIT;;Apr 25, 1995
|
---|
| 3 | S:'$D(DTIME) DTIME=600
|
---|
| 4 | A W !,"GLOBAL SEARCH",!,"Global reference: " R GREF:DTIME G QUIT:(GREF="^")!(GREF="")
|
---|
| 5 | S:$E(GREF)'="^" GREF="^"_GREF S:GREF'["(" GREF=GREF_"("
|
---|
| 6 | S GBL=GREF S:$E(GBL,$L(GBL))="," GBL=$E(GBL,1,$L(GBL)-1) S:$E(GBL,$L(GBL))'=")" GBL=GBL_")" S:$E(GREF,$L(GREF))=")" GREF=$E(GREF,1,$L(GREF)-1)
|
---|
| 7 | S:GBL["()" GBL=$P(GBL,"()",1)_"(-9)" S GBLSTART=GBL
|
---|
| 8 | I $Q(@GBL)="" W !,"Non-existing global." G A
|
---|
| 9 | B R !,"Search for: ",VAL:DTIME,! G QUIT:VAL="^",A:VAL="" S GBL=GBLSTART
|
---|
| 10 | ;I '$D(@GBL) S X=$O(@GBL),GBL=$ZR
|
---|
| 11 | I $D(@GBL)#2,@GBL[VAL W !,GBL,"=",@GBL,!
|
---|
| 12 | F I=1:1 S GBL=$Q(@GBL) Q:GBL'[GREF W:I#25=0 "." I @GBL[VAL W !,GBL,"=",@GBL,!
|
---|
| 13 | G B
|
---|
| 14 | QUIT K GBL,GREF,VAL Q
|
---|