source: IHS-VA_UTILITIES-XB/trunk/XBRSRCH5.m@ 1119

Last change on this file since 1119 was 642, checked in by Sam Habiel, 15 years ago

Modified directory structure; moved routines.

File size: 2.1 KB
Line 
1XBRSRCH5 ; IHS/ADC/GTH - SEARCH MISCELLANEOUS FOR ROUTINES ; [ 02/07/97 3:02 PM ]
2 ;;4.0;XB;;Jul 20, 2009;Build 2
3 ;
4 ; Part of XBRSRCH
5 ;
6START ;
7 W !!,"This routine searches a file for MISCELLANEOUS ^DD ENTRIES that call routines.",!
8 S U="^",DIC="^DIC(",DIC(0)="AEMQ"
9 D ^DIC
10 I Y<0 D EOJ Q
11 S XBSM("FILE")=+Y
12 KILL ^UTILITY("XBRSRCH",$J)
13 S XBSM("MASTER")=""
14EN ;EP - ENTRY POINT FOR CALLING ROUTINES
15 S XBSM("LAST FILE")=""
16 D FILE
17 D:$D(XBSM("MASTER")) LIST
18 D EOJ
19 Q
20 ;
21FILE ; CHECK ONE FILE
22 I $D(^DD(XBSM("FILE"),0,"ACT")) S X=^("ACT"),XBSM("GR")=$$MSMZR^ZIBNSSV D FILE2
23 I $D(^DD(XBSM("FILE"),0,"SCR")) S X=^("SCR"),XBSM("GR")=$$MSMZR^ZIBNSSV D FILE2
24 I $D(^DD(XBSM("FILE"),0,"ID")) S XBSM("FIELD")="" F XBSM("L")=0:0 S XBSM("FIELD")=$O(^DD(XBSM("FILE"),0,"ID",XBSM("FIELD"))) Q:XBSM("FIELD")="" S X=^(XBSM("FIELD")),XBSM("GR")=$$MSMZR^ZIBNSSV D FILE2
25 I $D(^DD(XBSM("FILE"),.01,7.5)) S X=^(7.5),XBSM("GR")=$$MSMZR^ZIBNSSV D FILE2
26 I $D(^DD(XBSM("FILE"),.01,"DEL")) S XBSM("SUB")="DEL" D FIELD
27 I $D(^DD(XBSM("FILE"),.01,"LAYGO")) S XBSM("SUB")="LAYGO" D FIELD
28 Q
29 ;
30FIELD ; CHECK ONE FIELD
31 S XBSM("FIELD")=""
32 F XBSM("L")=0:0 S XBSM("FIELD")=$O(^DD(XBSM("FILE"),.01,XBSM("SUB"),XBSM("FIELD"))) Q:XBSM("FIELD")="" D FIELD2
33 Q
34 ;
35FIELD2 ;
36 S XBSM("NODE")=""
37 F XBSM("L")=0:0 S XBSM("NODE")=$O(^DD(XBSM("FILE"),.01,XBSM("SUB"),XBSM("FIELD"),XBSM("NODE"))) Q:XBSM("NODE")="" S X=^(XBSM("NODE")),XBSM("GR")=$$MSMZR^ZIBNSSV D FILE2
38 Q
39 ;
40FILE2 ;
41 Q:X'[U
42 S XBRSRCH("FOUND")=0,XBSM("COUNT")=$L(X,U)
43 F XBSM("I")=XBSM("COUNT"):-1:2 S Y=$P(X,U,XBSM("I")) D ^XBRSRCH1
44 D:XBRSRCH("FOUND") WRITE
45 Q
46 ;
47WRITE ;
48 I $D(XBRSRCH("NO DETAIL")) W "." Q
49 I XBSM("FILE")'=XBSM("LAST FILE") S XBSM("LAST FILE")=XBSM("FILE") W !
50 W !,XBSM("GR"),?30,$E(X,1,49)
51 F XBSM("L")=0:0 S X=$E(X,50,999) Q:X="" W !?30,$E(X,1,49)
52 Q
53 ;
54LIST ; LIST ROUTINE NAMES
55 Q:'$D(^UTILITY("XBRSRCH",$J))
56 W !!,"Sorted list of routines found:",!
57 S X=""
58 F XBSM("L")=0:0 S X=$O(^UTILITY("XBRSRCH",$J,X)) Q:X="" W !,"^",X
59 KILL ^UTILITY("XBRSRCH",$J)
60 W !
61 Q
62 ;
63EOJ ;
64 KILL DIC
65 KILL X,X0,X1,X2,Y,YY
66 KILL:$D(XBSM("MASTER")) XBRSRCH
67 KILL XBSM,XBSMFL
68 Q
69 ;
Note: See TracBrowser for help on using the repository browser.