ZTGS ;SF/RWF - GLOBAL SEARCH ;12/6/89 14:01 ;
;;7.3;TOOLKIT;;Apr 25, 1995
S:'$D(DTIME) DTIME=600
A W !,"GLOBAL SEARCH",!,"Global reference: " R GREF:DTIME G QUIT:(GREF="^")!(GREF="")
S:$E(GREF)'="^" GREF="^"_GREF S:GREF'["(" GREF=GREF_"("
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)
S:GBL["()" GBL=$P(GBL,"()",1)_"(-9)" S GBLSTART=GBL
I $Q(@GBL)="" W !,"Non-existing global." G A
B R !,"Search for: ",VAL:DTIME,! G QUIT:VAL="^",A:VAL="" S GBL=GBLSTART
;I '$D(@GBL) S X=$O(@GBL),GBL=$ZR
I $D(@GBL)#2,@GBL[VAL W !,GBL,"=",@GBL,!
F I=1:1 S GBL=$Q(@GBL) Q:GBL'[GREF W:I#25=0 "." I @GBL[VAL W !,GBL,"=",@GBL,!
G B
QUIT K GBL,GREF,VAL Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HZTGS 756 printed Oct 16, 2024@18:16:44 Page 2
ZTGS ;SF/RWF - GLOBAL SEARCH ;12/6/89 14:01 ;
+1 ;;7.3;TOOLKIT;;Apr 25, 1995
+2 if '$DATA(DTIME)
SET DTIME=600
A WRITE !,"GLOBAL SEARCH",!,"Global reference: "
READ GREF:DTIME
if (GREF="^")!(GREF="")
GOTO QUIT
+1 if $EXTRACT(GREF)'="^"
SET GREF="^"_GREF
if GREF'["("
SET GREF=GREF_"("
+2 SET GBL=GREF
if $EXTRACT(GBL,$LENGTH(GBL))=","
SET GBL=$EXTRACT(GBL,1,$LENGTH(GBL)-1)
if $EXTRACT(GBL,$LENGTH(GBL))'=")"
SET GBL=GBL_")"
if $EXTRACT(GREF,$LENGTH(GREF))=")"
SET GREF=$EXTRACT(GREF,1,$LENGTH(GREF)-1)
+3 if GBL["()"
SET GBL=$PIECE(GBL,"()",1)_"(-9)"
SET GBLSTART=GBL
+4 IF $QUERY(@GBL)=""
WRITE !,"Non-existing global."
GOTO A
B READ !,"Search for: ",VAL:DTIME,!
if VAL="^"
GOTO QUIT
if VAL=""
GOTO A
SET GBL=GBLSTART
+1 ;I '$D(@GBL) S X=$O(@GBL),GBL=$ZR
+2 IF $DATA(@GBL)#2
IF @GBL[VAL
WRITE !,GBL,"=",@GBL,!
+3 FOR I=1:1
SET GBL=$QUERY(@GBL)
if GBL'[GREF
QUIT
if I#25=0
WRITE "."
IF @GBL[VAL
WRITE !,GBL,"=",@GBL,!
+4 GOTO B
QUIT KILL GBL,GREF,VAL
QUIT