XBRSRCH ; IHS/ADC/GTH - SEARCH DD FOR CALLED ROUTINES ; [ 02/07/97 3:02 PM ]
;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
;
; This routine searches a dictionary for called routines,
; excluding %DT*, DIC, DIK, and DIQ.
;
START ;
W !,"This routine searches dictionaries for called routines, excluding %DT*, DIC,",!," DIK, and DIQ.",!
S U="^"
R !,"[D]etail or [L]ist only: L//",X:$G(DTIME,999)
S:X'="D" XBRSRCH("NO DETAIL")=1
; could be a little friendlier
W !
D ^XBDSET
Q:'$D(^UTILITY("XBDSET",$J))
S XBRSRCH("QFLG")=0,XBRSRCH("FILE")=0
F XBRSRCH("L")=0:0 S XBRSRCH("FILE")=$O(^UTILITY("XBDSET",$J,XBRSRCH("FILE"))) Q:XBRSRCH("FILE")="" D CHECK Q:XBRSRCH("QFLG")
KILL XBRSRCH,^UTILITY("XBDSET",$J)
Q
;
CHECK ; CHECK FILES UNTIL ALL DONE
W !!,"Searching ",$P(^DIC(XBRSRCH("FILE"),0),"^",1)," file (",XBRSRCH("FILE"),")"
KILL ^UTILITY("XBRSRCH",$J)
W !!,"INPUT TRANSFORMS",!
S XBSINP("FILE")=XBRSRCH("FILE")
D EN^XBRSRCH2
W !!,"OUTPUT TRANSFORMS",!
S XBSOUT("FILE")=XBRSRCH("FILE")
D EN^XBRSRCH3
W !!,"CROSS-REFERENCES",!
S XBSXREF("FILE")=XBRSRCH("FILE")
D EN^XBRSRCH4
W !!,"MISCELLANEOUS ^DD ENTRIES",!
S XBSM("FILE")=XBRSRCH("FILE")
D EN^XBRSRCH5
W !
D LIST
D EOJ
Q
;
LIST ; LIST ROUTINE NAMES
Q:'$D(^UTILITY("XBRSRCH",$J))
W !!,"Sorted list of routines found:",!
S X=""
F XBRSRCH("L")=0:0 S X=$O(^UTILITY("XBRSRCH",$J,X)) Q:X="" W !,"^",X
W !
Q
;
EOJ ;
KILL ^UTILITY("XBRSRCH",$J),X,Y,DIC
Q
;
XBRSRCH ; IHS/ADC/GTH - SEARCH DD FOR CALLED ROUTINES ; [ 02/07/97 3:02 PM ]
+1 ;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
+2 ;
+3 ; This routine searches a dictionary for called routines,
+4 ; excluding %DT*, DIC, DIK, and DIQ.
+5 ;
START ;
+1 WRITE !,"This routine searches dictionaries for called routines, excluding %DT*, DIC,",!," DIK, and DIQ.",!
+2 SET U="^"
+3 READ !,"[D]etail or [L]ist only: L//",X:$GET(DTIME,999)
+4 IF X'="D"
SET XBRSRCH("NO DETAIL")=1
+5 ; could be a little friendlier
+6 WRITE !
+7 DO ^XBDSET
+8 IF '$DATA(^UTILITY("XBDSET",$JOB))
QUIT
+9 SET XBRSRCH("QFLG")=0
SET XBRSRCH("FILE")=0
+10 FOR XBRSRCH("L")=0:0
SET XBRSRCH("FILE")=$ORDER(^UTILITY("XBDSET",$JOB,XBRSRCH("FILE")))
IF XBRSRCH("FILE")=""
QUIT
DO CHECK
IF XBRSRCH("QFLG")
QUIT
+11 KILL XBRSRCH,^UTILITY("XBDSET",$JOB)
+12 QUIT
+13 ;
CHECK ; CHECK FILES UNTIL ALL DONE
+1 WRITE !!,"Searching ",$PIECE(^DIC(XBRSRCH("FILE"),0),"^",1)," file (",XBRSRCH("FILE"),")"
+2 KILL ^UTILITY("XBRSRCH",$JOB)
+3 WRITE !!,"INPUT TRANSFORMS",!
+4 SET XBSINP("FILE")=XBRSRCH("FILE")
+5 DO EN^XBRSRCH2
+6 WRITE !!,"OUTPUT TRANSFORMS",!
+7 SET XBSOUT("FILE")=XBRSRCH("FILE")
+8 DO EN^XBRSRCH3
+9 WRITE !!,"CROSS-REFERENCES",!
+10 SET XBSXREF("FILE")=XBRSRCH("FILE")
+11 DO EN^XBRSRCH4
+12 WRITE !!,"MISCELLANEOUS ^DD ENTRIES",!
+13 SET XBSM("FILE")=XBRSRCH("FILE")
+14 DO EN^XBRSRCH5
+15 WRITE !
+16 DO LIST
+17 DO EOJ
+18 QUIT
+19 ;
LIST ; LIST ROUTINE NAMES
+1 IF '$DATA(^UTILITY("XBRSRCH",$JOB))
QUIT
+2 WRITE !!,"Sorted list of routines found:",!
+3 SET X=""
+4 FOR XBRSRCH("L")=0:0
SET X=$ORDER(^UTILITY("XBRSRCH",$JOB,X))
IF X=""
QUIT
WRITE !,"^",X
+5 WRITE !
+6 QUIT
+7 ;
EOJ ;
+1 KILL ^UTILITY("XBRSRCH",$JOB),X,Y,DIC
+2 QUIT
+3 ;