source: IHS-VA_UTILITIES-XB/trunk/XBVCHV.m@ 1681

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

Modified directory structure; moved routines.

File size: 1.4 KB
Line 
1XBVCHV ; IHS/ADC/GTH - PULL IN VARIABLES AND ROUTINES FROM A %INDEX ; [ 02/07/97 3:02 PM ]
2 ;;4.0;XB;;Jul 20, 2009;Build 2
3 ;
4 ; Thanks to Paul Wesley, DSD/OIRM, for the original routine.
5 ;
6OPEN ;
7 D DT^DICRW
8 D ^XBCLS
9 W !!,"Select a %INDEX Summary that was put to disk",!
10 KILL DIR
11 S DIR(0)="F^1:30",DIR("A")="Directory ",DIR("B")="/usr/mumps/"
12 D ^DIR
13 KILL DIR
14 Q:Y["^"
15 S XBDIR=Y
16FNAME ;
17 KILL DIR
18FNAME1 ;
19 S DIR(0)="F^1:15",DIR("A")="File Name "
20 D ^DIR
21 KILL DIR
22 G:Y["^" OPEN
23 I Y?.N,$D(XBFL(Y)) S DIR("B")=XBFL(Y) G FNAME1
24 I Y["*" KILL XBFL S X=$$LIST^%ZISH(XBDIR,Y,.XBFL) D G FNAME
25 . F XBI=1:1 Q:'$D(XBFL(XBI)) W !?5,XBI,?10,XBFL(XBI)
26 .Q
27 S XBFN=Y,X=$$OPEN^%ZISH(XBDIR,XBFN,"R")
28ES ;
29 I X W !,"error on open of file ",XBDIR,XBFN,! KILL DIR S DIR(0)="E" D ^DIRQ:Y=1 G FNAME
30 S XBJ=$J,XBVRLC=0
31 KILL ^XBVROU(XBJ,"V")
32 W !,"Looking for 'Indexed Routines:' ",!
33READ ;
34 F XBI=1:1:20 U IO R X:DTIME U IO(0) W "." I X["Indexed Routines:" S XBOK=1 W !,"Found ! ... continuing" Q
35 I '$G(XBOK) KILL DIR
36 F XBI=1:1 U IO R X:DTIME Q:X["Local V"
37 F XBI=1:1 U IO R X:DTIME Q:X["Global " D
38 . Q:$L(X)<17
39 . Q:$E(X,17)=" "
40 . I X[$C(13) S X=$P(X,$C(13))
41 . S XBVARL=$G(XBVAR)
42 . I $E(X,4)'=" " S XBVAR="" F XBI=4:1 S XBX=$E(X,XBI) Q:" ("[XBX S XBVAR=XBVAR_XBX
43 . I XBVAR'=XBVARL S XBVRLC=0
44 . S XBR=$E(X,17,999),XBR=$TR(XBR,"*!","")
45 . S XBVRLC=XBVRLC+1,^XBVROU(XBJ,"V",XBVAR,XBVRLC)=XBR
46 .Q
47 D ^%ZISC
48 S XBFILE=1
49 Q
50 ;
Note: See TracBrowser for help on using the repository browser.