source: IHS-VA_UTILITIES-XB/trunk/XBHEDD.m@ 1703

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

Modified directory structure; moved routines.

File size: 3.4 KB
Line 
1XBHEDD ;402,DJB,5/1/90,EDD - Electronic Data Dictionary
2 ;;4.0;XB;;Jul 20, 2009;Build 2
3 ;;FLAGQ='^',FLAGE='^^',FLAGP=Printing on,FLAGP1=Option 11 selected to turn on printing
4 ;;FLAGH=Bypass 1st screen
5 ;;FLAGS=Scrolling speed set,FLAGL=Last item in list,FLAGM='^' or
6 ;;'^^' in menu,FLAGG=No Groups,FLAGNFF=Suppress Form Feed,FLAGPT=Pointer File or Field nonexistent
7 ;;FLAGGL=Invalid entry in GLOBAL
8TOP ;
9 S:'$D(DUZ)#2 DUZ=0 I +DUZ=0 W *7,!!?5,"Your DUZ is not defined!",! Q
10 N FLAGE,FLAGG,FLAGGL,FLAGGL1,FLAGL,FLAGM,FLAGP,FLAGP1,FLAGQ,FLAGS
11 N A,B,BAR,C,C1,DASHES,DIC,E,EDDDATE,FGRP,FILE,FLD,G,GROUP,GROUP1,GRP1,GRP2,GT,H,HD,I,I2,II,III,IOP,J,K,L,LENGTH,LEVEL,LINE,M1,M2,M3,M4,M5,NORMAL,NUM,O,PAGE,SCROLL,SIZE,SLOW,SPACE,STRING,X,XREF,XREFNAM,XREFTYPE,XX,Y,YCNT
12 N Z,Z1,ZA,ZANS,ZAP,ZB,ZCNT,ZD,ZDATA,ZDATA1,ZDSUB,ZFLDNAM,ZFLDNUM,ZGL,ZGL1,ZHELP,ZHNUM,ZLINE,ZLINE1,ZLINE2,ZMULT,ZMZ,ZNAM,ZPOTMP,ZZGL
13 N ZNUM,ZONE,ZPAGE,ZPF,ZPO,ZPO1,ZPO2,ZTHREE,ZTWO,ZX,ZY1,ZZ,ZZ1,ZZA,ZZB,ZZH,ZZX
14 D INIT
15EN S (FLAGP,FLAGQ,FLAGS)=0 K ^UTILITY($J)
16 D:'FLAGH HD
17 D GETFILE G:FLAGQ EX D MULT^XBHEDD7,MENU G:FLAGE EX
18 S FLAGH=1 G EN ;Set FLAGH to bypass opening screen
19EX ;Exit
20 K FLAGH,FLAGNFF,^UTILITY($J)
21 Q
22GETFILE ;File lookup
23 R !?8,"Select FILE: ",X:DTIME S:'$T X="^" I "^"[X S FLAGQ=1 Q
24 I $L(X)>1,$E(X)="^" D GLOBAL^XBHEDD9 G:FLAGGL GETFILE Q
25 I X="?" W !?1,"Enter global in the format '^DG' or '^RA(78', or"
26 S DIC="^DIC(",DIC(0)="QEM" D ^DIC K DIC I Y<0 G GETFILE
27 S ZNUM=+Y,ZNAM=$P(Y,U,2),ZGL=^DIC(ZNUM,0,"GL")
28 Q
29MENU ;
30 S (FLAGE,FLAGG,FLAGL,FLAGM,FLAGQ,FLAGP1,FLAGS)=0
31 D HD1,^XBHEDDM G:FLAGP1 MENU I FLAGP S:IO'=IO(0) FLAGQ=1 D PRINT^XBHEDD7 ;Turn off printing
32 Q:FLAGM!FLAGE G:FLAGQ MENU
33 I $Y'>SIZE F I=$Y:1:SIZE W !
34 R !!?2,"<RETURN> to go to Main Menu, '^' to exit: ",Z1:DTIME S:'$T Z1="^" I Z1="^" S FLAGE=1 Q
35 G MENU
36DIR ;Supress heading
37 S FLAGH=1 G TOP
38GL ;Call XBHEDD here to get listing of Globals in ASCII order.
39 N FLAGH,FLAGNFF,FLAGP,FLAGQ,M1,M2,M3,M4,M5,SIZE,Z1,ZLINE,ZLINE1,ZLINE2
40 S SIZE=(IOSL-5),(FLAGP,FLAGQ)=0 D INIT,GL^XBHEDD10 G EX
41PRT ;Stop page feeds. Use on ptr/keyboard
42 S (FLAGH,FLAGNFF)=1 G TOP
43HD ;
44 W:'FLAGNFF @IOF
45 W !?65,"David Bolduc",!?65,"Togus, ME"
46 W !!!?35,"E D D",!?34,"~~~~~~~",!?35,"~~~~~",!?36,"~~~",!?37,"~",!?25,"Electronic Data Dictionary",!?32,"Version 2.3",!
47 W !?22,"*",?25,"Everything you ever wanted",?53,"*",!?22,"*",?25,"to know about a file but",?53,"*",!?22,"*",?25,"were afraid to ask.",?53,"*"
48 W !!
49 Q
50HD1 ;Heading for Top of Main Menu
51 W:'FLAGNFF @IOF W !?M1,"A.) FILE NAME:------------- ",ZNAM
52 W !?48,"F.) FILE ACCESS:"
53 W !?M1,"B.) FILE NUMBER:----------- ",ZNUM
54 W ?53,"DD______ ",$S($D(^DIC(ZNUM,0,"DD")):^("DD"),1:"")
55 W !?53,"Read____ ",$S($D(^DIC(ZNUM,0,"RD")):^("RD"),1:"")
56 W !?M1,"C.) NUM OF FLDS:----------- ",^UTILITY($J,"TOT")
57 W ?53,"Write___ ",$S($D(^DIC(ZNUM,0,"WR")):^("WR"),1:"")
58 W !?53,"Delete__ ",$S($D(^DIC(ZNUM,0,"DEL")):^("DEL"),1:"")
59 W !?M1,"D.) DATA GLOBAL:----------- ",ZGL
60 W ?53,"Laygo___ ",$S($D(^DIC(ZNUM,0,"LAYGO")):^("LAYGO"),1:"")
61 W !!?M1,"E.) TOTAL GLOBAL ENTRIES:-- "
62 S ZZGL=ZGL_"0)",ZZGL=@ZZGL W $S($P(ZZGL,U,4)]"":$P(ZZGL,U,4),1:"Blank")
63 W ?48,"G.) PRINTING STATUS:-- ",$S(FLAGP:"On",1:"Off")
64 W !,$E(ZLINE1,1,80)
65 Q
66INIT ;
67 S:'$D(DTIME) DTIME=600 S M1=2,M2=15,M3=20,M4=22,M5=25 ;Variables for column numbers
68 K ZLINE,ZLINE1,ZLINE2 S $P(ZLINE,"-",212)="",$P(ZLINE1,"=",212)="",$P(ZLINE2,". ",106)="",U="^"
69 S IOP=0 D ^%ZIS K IOP S SIZE=(IOSL-5) S:'$D(FLAGNFF) FLAGNFF=0 S:'$D(FLAGH) FLAGH=0
70 Q
Note: See TracBrowser for help on using the repository browser.