1 | LBRYALA1 ;SSI/ALA-Edit Files ;[ 05/16/94 5:46 PM ]
|
---|
2 | ;;2.5;Library;;Mar 11, 1996
|
---|
3 | S U="^"
|
---|
4 | BEG R !,"Enter File: ",AFIL:DTIME Q:AFIL=""
|
---|
5 | I AFIL<680!(AFIL>689.99) G BEG
|
---|
6 | I '$D(^DIC(AFIL)) W !,"No such file - try again" G BEG
|
---|
7 | FD R !,"Use a (T)emplate or (S)elect Fields: ",ANS:DTIME G BEG:ANS=""
|
---|
8 | I $F("Tt",ANS) D TM
|
---|
9 | I $F("Ss",ANS) D SL
|
---|
10 | G FD
|
---|
11 | TM S CT=0,FI="F"_AFIL,DIC=^DIC(AFIL,0,"GL")
|
---|
12 | S TPN="" D TP
|
---|
13 | I CT=0 W !,"No input templates found" G TM
|
---|
14 | TE R !,"Select One: ",TNM:DTIME Q:TNM=""
|
---|
15 | I TNM'?.N G TE
|
---|
16 | I TNM>CT W !,"Not valid" G TE
|
---|
17 | S TPN=$P($G(TEM(TNM)),U) I TPN="" W !,"Not found" G TM
|
---|
18 | S DIE=DIC,DIC(0)="AEMZ" D ^DIC Q:Y<0 S DA=+Y
|
---|
19 | S DR="["_TPN_"]" D ^DIE
|
---|
20 | Q
|
---|
21 | TP S TPN=$O(^DIE(FI,TPN)) Q:TPN=""
|
---|
22 | S CT=CT+1,TEM(CT)=TPN_U_$O(^DIE(FI,TPN,""))
|
---|
23 | W !,CT," ",TPN
|
---|
24 | G TP
|
---|
25 | SL S CT=0,FL=0,DIC=^DIC(AFIL,0,"GL")
|
---|
26 | D SP
|
---|
27 | SE R !,"Select Fields: ",SNM:DTIME Q:SNM=""
|
---|
28 | SE1 S DIE=DIC,DIC(0)="AEMZ" D ^DIC Q:Y<0 S DA=+Y
|
---|
29 | S DR=SNM D ^DIE
|
---|
30 | G SE1
|
---|
31 | SP S FL=$O(^DD(AFIL,FL)) Q:FL'>0
|
---|
32 | W !,FL," ",$P(^DD(AFIL,FL,0),U)
|
---|
33 | G SP
|
---|