source: IHS-VA_UTILITIES-XB/trunk/XBLFD.m@ 1230

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

Modified directory structure; moved routines.

File size: 1.8 KB
RevLine 
[641]1XBLFD ;IHS/SET/GTH - LISTS FILE DESCRIPTIONS ; [ 04/18/2003 9:05 AM ]
2 ;;4.0;XB;;Jul 20, 2009;Build 2
3 ;IHS/SET/GTH XB*3*9 10/29/2002 New routine.
4 ; This routine lists the number, name, global, and, optionally,
5 ; description <if any> of the selected file(s).
6 ;
7START ;
8 ; --- Display routine description.
9 D HOME^%ZIS,DT^DICRW
10 KILL ^UTILITY($J)
11 S ^UTILITY($J,"XBLFD")=""
12 D EN^XBRPTL
13 KILL ^UTILITY($J)
14 NEW QFLG,XBDESC
15 S QFLG=0
16 ; --- Get file(s).
17 D ^XBDSET
18 Q:'$D(^UTILITY("XBDSET",$J))
19 ; --- Print DESCRIPTION flag.
20 S XBDESC=$$DIR^XBDIR("Y","Print file DESCRIPTION ","Y",$G(DTIME,500),"You can include the DESCRIPTION of the file in your list")
21 Q:Y="^"
22 I XBDESC NEW DIWL,DIWR,DIWF S DIWL=14,DIWR=74,DIWF="W"
23 ; --- Select device.
24 W !
25 S %ZIS="Q",ZTSAVE("^UTILITY(""XBDSET"",$J,")=""
26 D EN^XUTMDEVQ("EN^XBLFD","List File Descriptions.",.ZTSAVE,.%ZIS)
27 D EN^XBVK("ZT")
28 Q
29 ;
30EN ;PEP - List 0th node of pre-selected list of FileMan files.
31 ; IOF,IOSL must be set and U IO if appropriate.
32 I $D(IOF)#2,$D(IOSL)#2
33 E Q
34 NEW F,G,N,X,QFLG
35 ; F:File #; G:Global; N:Zeroth
36 S QFLG=0
37 D HEADER
38 S F=0
39 F S F=$O(^UTILITY("XBDSET",$J,F)) Q:F'=+F S G=$$FGLOB^XBFUNC(F) I G'=-1 D LIST Q:QFLG
40 D ^%ZISC
41 Q
42 ;
43LIST ;
44 D:$Y>(IOSL-3) PAGE
45 Q:QFLG
46 W F,?13,$$FNAME^XBFUNC(F),?60,G,!
47 I XBDESC D DESC(F)
48 Q
49 ;
50DESC(F) ; Print file DESCRIPTION.
51 NEW XB
52 F XB=0:0 S XB=$O(^DIC(F,"%D",XB)) Q:'XB S X=$G(^(XB,0)) D ^DIWP I $Y>(IOSL-3) D PAGE Q:QFLG
53 Q:QFLG
54 D ^DIWW
55 Q
56 ;
57PAGE ; PAGE BREAK
58 NEW F,G,N,X
59 I IO=IO(0),$E(IOST,1,2)="C-" S Y=$$DIR^XBDIR("E") S:$D(DIRUT)!($D(DUOUT)) QFLG=1 KILL DIRUT,DUOUT
60 Q:QFLG
61 D HEADER
62 Q
63 ;
64HEADER ; PRINT HEADER
65 W @IOF,$$FMTE^XLFDT($$NOW^XLFDT),?34,"FILE DESCRIPTIONS"
66 X ^%ZOSF("UCI")
67 W ?65,$P(Y," ",1),!,$$REPEAT^XLFSTR("-",IOM),!,"NUMBER",?13,"FILE",?60,"GLOBAL",!
68 I XBDESC W ?13,"<DESCRIPTION>",!
69 W $$REPEAT^XLFSTR("-",IOM),!!
70 Q
71 ;
Note: See TracBrowser for help on using the repository browser.