source: WorldVistAEHR/trunk/r/TOOLKIT-AWCM-XD-XIN-XPAR-XQAB-XT-XUC-XUR-ZIN-ZTED/ZINDX6.m@ 623

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

initial load of WorldVistAEHR

File size: 3.6 KB
Line 
1%INDX6 ;ISC/REL,GRK - GET SET OF ROUTINES TO INDEX ;8/3/93 16:10 ;
2 ;;7.3;TOOLKIT;;Apr 25, 1995
3 ;INP(1=Print more than warnings, 2= Print routines, 3= Print warnings, 4= Print DDs & Functions & Options, 5= Type of List, 6= Summary only, 7= Save Parameters
4 ;INP(8= Index called routines, 9= Include the Compiled template routines
5 D HOME^%ZIS,HDR S:'$D(DTIME)#2 DTIME=360
6 K ^UTILITY($J),ZTSK,ZTDTH,ZTIO D ASKRTN S Q="""",RTN=0 F I=1:1:10 S INP(I)=0
7 S INDDA=0 I $D(^DIC(9.4)) D ^%INDX10 G END:$D(DUOUT) S INDDA=DA I DA>0 D ANS("Include the compiled template routines: N//","NY") G:X="^" END S:"Nn"'[X INP(9)=1
8 G END:(NRO'>0)&(INDDA'>0)
9 D ANS("Print more than compiled errors and warnings? YES//","YN","Print detailed info") G:X="^" END S INP(1)="Yy"[X G:'INP(1) L7
10 D ANS("Print summary only? NO//","NY","Skip detail on each routine") G:X="^" END S INP(6)="Yy"[X G L7:INP(6)
11 D ANS("Print routines? YES//","YN","Print routines code also") G:X="^" END S INP(2)="Yy"[X
12 I INP(2) D ANS("Print (R)egular,(S)tructured or (B)oth? R//","RLIST") G:X="^" END S INP(5)=X
13 I INDDA>0 D ANS("Print the DDs, Functions, and Options? YES//","YN","Gather other package code.") G:X="^" END S INP(4)="Yy"[X
14 D ANS("Print errors and warnings with each routine? YES//","YN") G:X="^" END S INP(3)="Yy"[X
15L7 I $D(^DIC(9.8,0)) D ANS("Save parameters in ROUTINE file? NO//","NY","Update the ROUTINE file with details") G:X="^" END S INP(7)="Yy"[X
16 D ANS("Index all called routines? NO//","NY","Add called routines") G:X="^" END S INP(8)="Yy"[X
17DEVICE W:NRO>2 !!,$C(7),"This report could take some time, Remember to QUEUE the report.",! K IOP,%ZIS S %ZIS="QM",%ZIS("B")="" D ^%ZIS K %ZIS I POP W !,*7,"%INDEX terminated. No device specified." G END
18 ;S IOP=ION_";"_IOST_$S($D(IO("DOC")):";"_IO("DOC"),1:";"_IOM_";"_IOSL)
19 I IO=IO(0),"C"[$E(IOST),$D(IO("Q"))#2 W !,"Do you really mean queue to this device? NO//" D NY I "Nn"[X W !!,"Ok, tell me again ..." K IO("Q") D ^%ZISC G DEVICE
20 ;I IO'=IO(0),'$D(IO("Q")) W !!,"I am QUEUEING this report for you." S IO("Q")=1
21 I '$D(IO("Q")) G ALIVE^%INDEX
22 S ZTRTN="ALIVE^%INDEX",ZTDESC="%INDEX of "_NRO_" routine"_$S(NRO>1:"s.",1:".") F G="INP(","INDDA","^UTILITY($J,","NRO","INDPM" S ZTSAVE(G)=""
23 K IO("Q") D ^%ZTLOAD,HOME^%ZIS
24END K ZTSK,%ZIS G CLEAN^%INDX5
25ANS(PR,DEF,HELP) ;Ask question get answer
26 N % F S Y=1 W !!,PR D @DEF Q:Y
27 Q
28YN S %="Y" D RD Q:"^YyNn"[X W:$D(HELP) !,HELP W !,"Please enter 'Y' or return for YES, 'N' for NO" S Y=0 Q
29NY S %="N" D RD Q:"^YyNn"[X W:$D(HELP) !,HELP W !,"Please enter 'N' or return for NO, 'Y' for YES" S Y=0 Q
30RD R X:DTIME S:X["^" X="^" S X=$E(X_%) Q
31RLIST S %="R" D RD Q:"^RSBF"[X W !,"Please select one of the choices." S Y=0 Q
32 Q
33ASKRTN ;Collect a list of routines to index.
34 I $D(^%ZOSF("RSEL")) X ^("RSEL") S NRO=0,X=0 F I=0:0 S X=$O(^UTILITY($J,X)) Q:X="" S NRO=NRO+1
35 Q
36 W !!,"LIST OF ROUTINES TO BE INDEXED; PRESS RETURN TO TERMINATE LIST",! S NRO=0
37R1 R !,"ROUTINE NAME: ",ROU:$S($G(DTIME):DTIME,1:360) Q:ROU=""
38 I ROU'?1"%".UN&(ROU'?1U.UN) W " INVALID ROUTINE NAME" G R1
39 I $D(^%ZOSF("TEST")) S X=ROU X ^("TEST") E W " INVALID ROUTINE NAME" G R1
40 S NRO=NRO+1,^UTILITY($J,ROU)="" G R1
41SETUP ;Write startup header stuff.
42 U IO D HDR
43 S Q="""",U="^",INDDS=0,RTN="$",DA=INDDA,IND("TM")=$H I INDDA>0 D START^%INDX10 D:IOSL\2<$Y HDR W !!,"Routines are being processed.",!
44 W "Indexed Routines: ",NRO,!!
45 Q
46HDR D NOW^%DTC S Y=%,DT=$P(Y,".",1) D DD^%DT S INDXDT=Y X ^%ZOSF("UCI") S INDHDR(1)="UCI: "_$P(Y,",")_" CPU: "_^%ZOSF("VOL")_" "_INDXDT,INDHDR="V. A. C R O S S R E F E R E N C E R "_$P($T(+2),";",3)
47 W:$Y>3 @IOF W !!,?IOM-$L(INDHDR)\2,INDHDR,!,?IOM-$L(INDHDR(1))\2,INDHDR(1),!
48 Q
Note: See TracBrowser for help on using the repository browser.