%INDX5 ;SF-ISC/RWF - CROSS REFERENCE ALL ROUTINES ;12/1/93 08:17 ;
;;7.3;TOOLKIT;;Apr 25, 1995
G END:$D(IND("QUIT")) I INP(8) W !,"Called Routines",! D ^%INDX52 ;Get called routines
K ARG,CCN,CH,COM,ERR,GK,GRB,I,INDDA,INDDS,L,LAB,LAB0,LC,LIN,LOC,PC,PRV,R,RTN,S,STR,TXT,V,X,Y
D ^%INDX53:INP(7) ;Load routine file
S RN="$" W !!,"--- CROSS REFERENCING ---",!
A S RN=$O(^UTILITY($J,RN)),L="",LABO=0 I RN="" G B
F I=1:1 S L=$O(^UTILITY($J,1,RN,"X",L)) Q:L="" S XX2=^(L,0),XX1=$P(L," ",2),T=$P(XX1,"+",1),P=$P(L," ",1) D AA
G A
AA I '$D(^UTILITY($J,1,P)),P'["%" S X=P X ^%ZOSF("TEST") I '$T S RTN=RN,LAB=$P(XX2,","),ERR=52,ERR(1)=P D ^%INDX1
I T]"",$D(^UTILITY($J,1,P)) S:T["$" T=$E(T,3,99) I T]"",'$D(^UTILITY($J,1,P,"T",T)) S RTN=P,LAB=XX1,ERR=38 D ^%INDX1
Q
B D ^%INDX51
END W:$D(IND("QUIT")) !!,"--- ",$S($D(ZTSTOP):"TASK ",1:""),"STOPPED ---" W !!,"--- END ---"
I IO'=IO(0) U IO(0) W !,"--- D O N E ---" U IO
D ^%ZISC
S:$D(ZTQUEUED) ZTREQ="@"
CLEAN ;Come here from %INDX6 if queued output.
K %,%1,%2,%I1,%IN1,%UCN,A,ARG,C,C9,CCN,CH,COM,DA,DIC,DUOUT,ERR,ERTX,F,F1,G,GK,GRB,H,HED,HS
K ^UTILITY($J),I,IND,INDB,INDC,INDDA,INDDS,INDF,INDFN,INDLC,INDPM,INDX,INDXDT,INDXJ,INP,IP,J,K,K1,K3,L,LAB,LABO,LBL,LC,LIN,LINE,LOC,NRO,OFF,P,PC,PGM,POP,POST,Q,R,RDTIME,RHS,ROU,RTN,S,S1,STR,SYM,TAB,TAG,TXT,TY,V,VZ,X,X1,X2,X3,Y
Q
CRX S RTN="$" F I=0:0 S RTN=$O(^UTILITY($J,RTN)) Q:RTN="" F LOC="L","G","MK","X" D CR0
K VZ Q
CR0 S S=-1 I LOC="X" K VZ I '$D(^UTILITY($J,1,"***","X",RTN_" ")) S ^UTILITY($J,1,"***","X",RTN_" ")=""
CR1 S S=$O(^UTILITY($J,1,RTN,LOC,S)) Q:S="" S X=$G(^UTILITY($J,1,RTN,LOC,S)) S:$G(^UTILITY($J,1,"***",LOC,S))'[X ^(S)=$G(^(S))_X
F J=0:1 Q:'$D(^UTILITY($J,1,RTN,LOC,S,J)) D CR2
G CR1
CR2 S PC="" I LOC'="X" S:^UTILITY($J,1,RTN,LOC,S,J)["*" PC=PC_"*" S:^(J)["!" PC=PC_"!" S:^(J)["~" PC=PC_"~" G CR3
Q:$D(VZ(S)) S S1=$S($P(S," ",2)]"":$P(S," ",2)_"^",1:"")_$P(S," ",1),VZ(S)=""
S X1=LOC,X2=S,X3=RTN,LOC="Z",S=RTN,RTN=S1 D CR3 S LOC=X1,S=X2,RTN=X3 K X1,X2,X3
D CR3 Q
CR3 S K=0
CR4 S ARG="" I $D(^UTILITY($J,1,"***",LOC,S,K)) S ARG=^(K) I $L(ARG)>230 S K=K+1 G CR4
S ^UTILITY($J,1,"***",LOC,S,K)=ARG_RTN_PC_"," Q
%INDX5 ;SF-ISC/RWF - CROSS REFERENCE ALL ROUTINES ;12/1/93 08:17 ;
+1 ;;7.3;TOOLKIT;;Apr 25, 1995
+2 ;Get called routines
IF $DATA(IND("QUIT"))
GOTO END
IF INP(8)
WRITE !,"Called Routines",!
DO ^%INDX52
+3 KILL ARG,CCN,CH,COM,ERR,GK,GRB,I,INDDA,INDDS,L,LAB,LAB0,LC,LIN,LOC,PC,PRV,R,RTN,S,STR,TXT,V,X,Y
+4 ;Load routine file
IF INP(7)
DO ^%INDX53
+5 SET RN="$"
WRITE !!,"--- CROSS REFERENCING ---",!
A SET RN=$ORDER(^UTILITY($JOB,RN))
SET L=""
SET LABO=0
IF RN=""
GOTO B
+1 FOR I=1:1
SET L=$ORDER(^UTILITY($JOB,1,RN,"X",L))
IF L=""
QUIT
SET XX2=^(L,0)
SET XX1=$PIECE(L," ",2)
SET T=$PIECE(XX1,"+",1)
SET P=$PIECE(L," ",1)
DO AA
+2 GOTO A
AA IF '$DATA(^UTILITY($JOB,1,P))
IF P'["%"
SET X=P
XECUTE ^%ZOSF("TEST")
IF '$TEST
SET RTN=RN
SET LAB=$PIECE(XX2,",")
SET ERR=52
SET ERR(1)=P
DO ^%INDX1
+1 IF T]""
IF $DATA(^UTILITY($JOB,1,P))
IF T["$"
SET T=$EXTRACT(T,3,99)
IF T]""
IF '$DATA(^UTILITY($JOB,1,P,"T",T))
SET RTN=P
SET LAB=XX1
SET ERR=38
DO ^%INDX1
+2 QUIT
B DO ^%INDX51
END IF $DATA(IND("QUIT"))
WRITE !!,"--- ",$SELECT($DATA(ZTSTOP):"TASK ",1:""),"STOPPED ---"
WRITE !!,"--- END ---"
+1 IF IO'=IO(0)
USE IO(0)
WRITE !,"--- D O N E ---"
USE IO
+2 DO ^%ZISC
--- END ---+3 IF $DATA(ZTQUEUED)
SET ZTREQ="@"
CLEAN ;Come here from %INDX6 if queued output.
+1 KILL %,%1,%2,%I1,%IN1,%UCN,A,ARG,C,C9,CCN,CH,COM,DA,DIC,DUOUT,ERR,ERTX,F,F1,G,GK,GRB,H,HED,HS
+2 KILL ^UTILITY($JOB),I,IND,INDB,INDC,INDDA,INDDS,INDF,INDFN,INDLC,INDPM,INDX,INDXDT,INDXJ,INP,IP,J,K,K1,K3,L,LAB,LABO,LBL,LC,LIN,LINE,LOC,NRO,OFF,P,PC,PGM,POP,POST,Q,R,RDTIME,RHS,ROU,RTN,S,S1,STR,SYM,TAB,TAG,TXT,TY,V,VZ,X,X1,X2,X3,Y
+3 QUIT
CRX SET RTN="$"
FOR I=0:0
SET RTN=$ORDER(^UTILITY($JOB,RTN))
IF RTN=""
QUIT
FOR LOC="L","G","MK","X"
DO CR0
+1 KILL VZ
QUIT
CR0 SET S=-1
IF LOC="X"
KILL VZ
IF '$DATA(^UTILITY($JOB,1,"***","X",RTN_" "))
SET ^UTILITY($JOB,1,"***","X",RTN_" ")=""
CR1 SET S=$ORDER(^UTILITY($JOB,1,RTN,LOC,S))
IF S=""
QUIT
SET X=$GET(^UTILITY($JOB,1,RTN,LOC,S))
IF $GET(^UTILITY($JOB,1,"***",LOC,S))'[X
SET ^(S)=$GET(^(S))_X
+1 FOR J=0:1
IF '$DATA(^UTILITY($JOB,1,RTN,LOC,S,J))
QUIT
DO CR2
+2 GOTO CR1
CR2 SET PC=""
IF LOC'="X"
IF ^UTILITY($JOB,1,RTN,LOC,S,J)["*"
SET PC=PC_"*"
IF ^(J)["!"
SET PC=PC_"!"
IF ^(J)["~"
SET PC=PC_"~"
GOTO CR3
+1 IF $DATA(VZ(S))
QUIT
SET S1=$SELECT($PIECE(S," ",2)]"":$PIECE(S," ",2)_"^",1:"")_$PIECE(S," ",1)
SET VZ(S)=""
+2 SET X1=LOC
SET X2=S
SET X3=RTN
SET LOC="Z"
SET S=RTN
SET RTN=S1
DO CR3
SET LOC=X1
SET S=X2
SET RTN=X3
KILL X1,X2,X3
+3 DO CR3
QUIT
CR3 SET K=0
CR4 SET ARG=""
IF $DATA(^UTILITY($JOB,1,"***",LOC,S,K))
SET ARG=^(K)
IF $LENGTH(ARG)>230
SET K=K+1
GOTO CR4
+1 SET ^UTILITY($JOB,1,"***",LOC,S,K)=ARG_RTN_PC_","
QUIT