source: IHS-VA_UTILITIES-XB/XBDIR.m@ 641

Last change on this file since 641 was 641, checked in by Sam Habiel, 14 years ago

Initial commit of XB, move away from sf.net.
Includes kids file and documentation.

File size: 1.6 KB
Line 
1XBDIR ; IHS/ADC/GTH - DIR INTERFACE ; [ 02/07/97 3:02 PM ]
2 ;;4.0;XB;;Jul 20, 2009;Build 2
3 ;
4 ; The purpose of routine XBDIR is to provide interface
5 ; methodology for a call to ^DIR, to ensure correct handling
6 ; of variables, and to provide for the expressiveness of an
7 ; extrinsic function.
8 ;
9 ; There is no requirement to use the entry point, below.
10 ;
11 ; The format of the call is to SET a local variable to the
12 ; output of the call to DIR^XBDIR(), which will be Y at the
13 ; bottom of this routine, or, less likely, WRITE the value.
14 ;
15 ; An example of the call is:
16 ; S %=$$DIR^XBDIR(<actual_parameter_list>)
17 ; where the <actual_parameter_list> is:
18 ;(DIR(0),DIR("A"),DIR("B"),DIR("T"),DIR("?"),DIR("??"),<skip>)
19 ; where <skip> is the number of lines to skip before the call
20 ; to ^DIR.
21 ;
22 ; Examples:
23 ;
24 ; S %=$$DIR^XBDIR("N^1:2","Select report method",2,"","Produ
25 ; ce report by FY or Dates","^D HELP^<your_routine>",300,2)
26 ;
27 ; S <namespace>FY=$$DIR^XBDIR("NO","Object Class Code Summar
28 ; y for FISCAL YEAR ",FY,$G(DTIME,500),"Enter a FOUR DIGIT F
29 ; ISCAL YEAR","^D SB1^<your_routine>")
30 ;
31 ;
32DIR(O,A,B,T,Q,H,R) ;PEP - Extrinsic interface to ^DIR.
33 I '$L($G(O)) Q -1
34 NEW DA,DIR
35 S DIR(0)=O
36 I $D(A) D
37 . I $L($G(A)) S DIR("A")=A
38 . I $L($O(A(""))) S O="" F S O=$O(A(O)) Q:'$L(O) S DIR("A",O)=A(O)
39 .Q
40 I $L($G(B)) S DIR("B")=B
41 I $G(T) S DIR("T")=T
42 I $D(Q) D
43 . I $L($G(Q)) S DIR("?")=Q
44 . I $L($O(Q(""))) S O="" F S O=$O(Q(O)) Q:'$L(O) S DIR("?",O)=Q(O)
45 .Q
46 I $L($G(H)) S DIR("??")=H
47 I $G(R) F A=1:1:R W !
48 KILL O,A,B,T,Q,H,R,DTOUT,DUOUT,DIRUT,DIROUT
49 D ^DIR
50 Q Y
51 ;
Note: See TracBrowser for help on using the repository browser.