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

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

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1ARJTXRW ;WV/TOAD - Routine Writing Tools ;12/23/2005 18:36
2 ;;4.0T1;WORLDVISTA EHR+;;JAN 9, 2006;
3 ; finally portable
4 ;
5 ; Change History:
6 ;
7 ; 2004 05 24 WV/TOAD - modify RSUM to handle GT.M version of %RSEL
8 ; 2005 12 23 WV/TOAD - modify RSUM to use ^%ZOSF("RSEL") instead
9 ;
10SUMMARIZ(ROUTINE) ; summarize a routine
11 ; ROUTINE = name of the routine
12 ;
13 N STATS
14 D ANALYZE^ARJTXRD(ROUTINE,.STATS)
15 N TOAD S TOAD=$P($P($G(STATS(1,0)),";",2),"-")["WV/TOAD"
16 ;
17 N NODE0 S NODE0=$G(STATS(0))
18 W !,$P(NODE0,U)
19 W ?9,$J($P(NODE0,U,3),4)
20 W ?14,$J($P(NODE0,U,4),5)
21 W ?20,$J($P(NODE0,U,5),10)
22 W ?31
23 N DESC S DESC=$P($P($G(STATS(1,0)),";",2),"-",2)
24 F Q:DESC="" Q:$E(DESC)'=" " S $E(DESC)=""
25 W $E(DESC,1,47)
26 N LOCAL S LOCAL=$$UP^XLFSTR($P($G(STATS(2,0)),";",7))
27 S LOCAL=$S(LOCAL'["LOCAL":"",LOCAL["RTN":"Y",LOCAL["ROUTINE":"Y",1:"*")
28 W ?79,LOCAL
29 ; QUIT ; for now. eventually, add a flag param here & a prompt in RSUM
30 ;
31 N SECTION
32 N ALINE S ALINE=$NA(STATS("ALINE"))
33 N SUBS S SUBS=$QL(ALINE)
34 N NODE S NODE=ALINE
35 F S NODE=$Q(@NODE) Q:NODE="" Q:$NA(@NODE,SUBS)'=ALINE D
36 . S SECTION=$QS(NODE,SUBS+3)
37 . W !?10,SECTION
38 . W ?20,$J($O(STATS("ASIZE",SECTION,0)),3)," lines"
39 . W " ",$$TRIM^XLFSTR($E($P(STATS($QS(NODE,2),0),";",2),1,49))
40 ;
41 QUIT
42 ;
43RSUM ; select a set of routines & summarize them
44 ;
45 W !!,"Routine Summary",!
46 ;
47 N ROUTINES D Q:$O(ROUTINES(""))=""
48 . N %UTILITY,%ZR K ^UTILITY($J)
49 . X ^%ZOSF("RSEL") ; Kernel routine selection tool
50 . K ^UTILITY($J,0)
51 . M ROUTINES=^UTILITY($J)
52 . K ^UTILITY($J)
53 ;
54 W !,"Name",?8,"Lines",?14,"Bytes",?22,"Checksum"
55 W ?31,"Description",?74,"Local?"
56 W !,"--------",?8,"-----",?14,"-----",?20,"----------",?31
57 W "-------------------------------------------------"
58 N R S R="" F S R=$O(ROUTINES(R)) Q:R="" D SUMMARIZ(R)
59 Q
60 ;
Note: See TracBrowser for help on using the repository browser.