source: WorldVistAEHR/trunk/r/VA_FILEMAN-ARJT-DI-DD-DM-DT-%DT-%RCR/ARJTDDK.m@ 1667

Last change on this file since 1667 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.6 KB
Line 
1ARJTDDK ;WV/TOAD-FileMan Search All Code ;5/26/2004 20:01
2 ;;3.0T1;OPENVISTA;;Jun 20, 2004;Build 1
3 ;
4 ; Change History:
5 ;
6 ; 2004 05 24 WV/TOAD: change TEST to handle GT.M as well as DSM
7 ; 2003 05 26 WV/TOAD: replace ALL^ARJTDDKR with ALL^ARJTDDKA
8 ;
9 ; Table of Contents:
10 ; ALL = search all code for something
11 ; PM = search for alternation in pattern match
12 ; DSM = search for DSM-specific code
13 ;
14 ; Not yet done:
15 ; 1. "free text" MUMPS fields --> DONE
16 ; 2. template lines
17 ; 3. new-style indexes
18 ; 4. constructed indirect code
19 ; 5. look for other computed/MUMPS hooks
20 ; 6. extended cross-reference logic (e.g., trigger logic)
21 ;
22 ;
23ALL(CONTAINS,FIND) ; search all code
24 ;
25 ; input:
26 ; .CONTAINS(string)="" to search any line containing the string
27 ; FIND = optional. special search, e.g., "DSM"
28 ;
29 ; output:
30 ; report to current device
31 ;
32 ; Calls:
33 ; ALL^ARJTDDKA - to search all routines
34 ; MUMPS^ARJTDDKM - to search all MUMPS fields
35 ; TEXT^ARJTDDK5 - search all "free-text" MUMPS fields
36 ; SEARCHDD^ARJTDDK4 - to search the entire DD
37 ;
38 W !!,"Lowering priority for duration of search.",!
39 N ARJTPRI,Y X ^%ZOSF("PRIINQ") S ARJTPRI=Y
40 N X S X=7 X ^%ZOSF("PRIORITY")
41 N $ET S $ET="D TRAP^ARJTDDK"
42 N EXIT S EXIT=0 ; not intrrupted yet
43 D
44 . W !!!,"1. SEARCH ALL ROUTINES"
45 . D ALL^ARJTDDKA(.CONTAINS,FIND,.EXIT)
46 I 'EXIT D
47 . W !!!,"2. SEARCH ALL MUMPS FIELDS"
48 . D MUMPS^ARJTDDKM(.CONTAINS,FIND,.EXIT)
49 I 'EXIT D
50 . W !!!,"3. SEARCH ALL ""FREE TEXT"" MUMPS FIELDS"
51 . D TEXT^ARJTDDK5(.CONTAINS,FIND,.EXIT)
52 I 'EXIT D
53 . W !!!,"4. SEARCH ALL DATA DICTIONARIES"
54 . D SEARCHDD^ARJTDDK4(.CONTAINS,FIND,.EXIT)
55 W !!!
56 I EXIT W "INTERRUPTED."
57 E W "DONE."
58 S X=ARJTPRI X ^%ZOSF("PRIORITY")
59 W !!,"Priority restored."
60 ;
61 QUIT ; end of ALL
62 ;
63 ;
64PM ; search all code for alternation in pattern match
65 D ALL("?","?(")
66 Q ; end of PM
67 ;
68 ;
69DSM ; search all code for DSM-specific code
70 S U="^"
71 N CONTAINS
72 S CONTAINS("Z")=""
73 S CONTAINS("&")=""
74 S CONTAINS("^%")=""
75 S CONTAINS("(%")=""
76 S CONTAINS("U ")=""
77 S CONTAINS("U:")=""
78 S CONTAINS("O ")=""
79 S CONTAINS("O:")=""
80 S CONTAINS("C ")=""
81 S CONTAINS("C:")=""
82 ;
83 D ALL(.CONTAINS,"DSM")
84 Q ; end of PM
85 ;
86 ;
87TEST ; test ARJTDIM's ability to find $ZC
88 N ZZDCOM
89 N CODE S CODE="S Y=$ZC(%ARCCOS) S Z=$ZDATE(X) D ^%SPAWN D &ZLIB.%ZWRITE(0) S W=$&ZLIB.%SPAWN(42)"
90 D CHECK^ARJTDIM(CODE,"DSM",.ZZDCOM)
91 ZWRITE ZZDCOM
92 Q
93 ;
94 ;
95TRAP W !!,"$ZE = ",$ZE
96 W !,"$EC = ",$EC
97 S $EC=""
98 N ARJTX F D Q:ARJTX="Q"!(ARJTX="^")!(ARJTX="")
99 . R !,"TRAP>",ARJTX:DTIME W !
100 . Q:ARJTX="Q"!(ARJTX="^")!(ARJTX="")
101 . X ARJTX
102 Q
103 ;
Note: See TracBrowser for help on using the repository browser.