source: IHS-VA_UTILITIES-XB/trunk/XBGXREFS.m@ 713

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

Modified directory structure; moved routines.

File size: 1.0 KB
RevLine 
[641]1XBGXREFS(FILE,FIELD,ROOT) ; IHS/ADC/GTH - GET XREFS FOR ONE FIELD IN ONE FILE ; [ 02/07/97 3:02 PM ]
2 ;;4.0;XB;;Jul 20, 2009;Build 2
3 ;
4 ; ATTENTION PROGRAMMERS: Do not use line one for entry.
5 ; Use label XREF for entry.
6 ;
7 ; Given a file/subfile number, a field number, and a variable
8 ; from which to assign subscripted values, this routine will
9 ; return the xrefs for the specified field.
10 ;
11 ; The returned xrefs will be subscripted from the ROOT as
12 ; follows:
13 ;
14 ; ROOT(FIELD,n) = file/subfile^xref (e.g. 9000010^AC)
15 ; ROOT(FIELD,n,"K") = executable kill logic
16 ; ROOT(FIELD,n,"S") = executable set logic
17 ;
18 ; Formal list:
19 ;
20 ; 1) FILE = file or subfile number (call by value)
21 ; 2) FIELD = field number (call by value)
22 ; 3) ROOT = array root (call by reference)
23 ;
24 G START
25 ;
26XREF(FILE,FIELD,ROOT) ;PEP - Return x-ref info for a field.
27 ;
28START ;
29 NEW Y
30 F Y=0:0 S Y=$O(^DD(FILE,FIELD,1,Y)) Q:Y'=+Y S ROOT(FIELD,Y)=^(Y,0),ROOT(FIELD,Y,"S")=^(1),ROOT(FIELD,Y,"K")=^(2)
31 Q
32 ;
Note: See TracBrowser for help on using the repository browser.