source: WorldVistAEHR/trunk/r/LIBRARY-LBR-LBRS/LBRYLST.m@ 975

Last change on this file since 975 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.6 KB
Line 
1LBRYLST ;ISC2/DJM-LIBRARY TITLE SETUP ;[ 05/23/97 12:13 PM ]
2 ;;2.5;Library;**2,9**;Mar 11, 1996
3 I $G(LBRYPTR)="" D I $G(LBRYPTR)="" W !!,$C(7),"No Site has been selected" Q
4 . D ^LBRYASK
5START W @IOF,?5,"VA Library Serials Title Setup for "_LBRYNAM
6 K CNT,COUNT,INACT,Y,LBRYLOC
7 D NOW^%DTC S Y=X X ^DD("DD") S YDT=Y W ?60,YDT,!
8 S DIC="^LBRY(680.5,",DIC(0)="AELMQZ",DLAYGO=680.5,LBRYNEW="",INACT=""
9 S DIC("A")="Select TITLE AUTHORITY TITLE: " D ^DIC
10 K DLAYGO,DIC("A") G:Y<0 EXIT1 S (LBRYCLS,DA)=+Y,LBRYNEW=$P(Y,U,3)
11 I $P(^LBRY(680.5,LBRYCLS,0),U,5)="N" K DR D G CONT1
12 . W @IOF,?5,"VA Library Serials Enter a Title",?60,YDT
13 . W !!,"TITLE: ",$P(^LBRY(680.5,LBRYCLS,0),U)
14 . W !!,"Displaying TITLE AUTHORITY file" S DR="0:3" D EN^DIQ
15CONT W @IOF,?5,"VA Library Serials Enter a Title",?60,YDT
16 W !!,"TITLE: ",$P(^LBRY(680.5,LBRYCLS,0),U)
17 W !!,"Editing TITLE AUTHORITY file"
18 K DR S DIE="^LBRY(680.5,",DA=LBRYCLS,DR="[LBRY CHECK-IN SETUP]"
19 S DIE("NO^")=1,DIC=DIE D LOCK^LBRYEDR G:LBRYL=0 EXIT
20 D ^DIE
21 K DIE("NO^"),DA L G:($D(Y)!($D(DTOUT))) EXIT1
22 I $P(^LBRY(680.5,LBRYCLS,0),U,5)="L",LBRYNEW=1 D ^LBRYLTF
23CONT1 S LBRTDA=""
24 F S LBRTDA=$O(^LBRY(680,"B",LBRYCLS,LBRTDA)) Q:LBRTDA="" D
25 . I $P(^LBRY(680,LBRTDA,0),U,4)=LBRYPTR S LBRYLOC=LBRTDA Q
26 I $G(LBRYLOC)="" K DO S LBRYNEW=1 D
27 . S DINUM=$P(^LBRY(680,0),U,3)
28 . F S DINUM=DINUM+1 Q:'$D(^LBRY(680,DINUM,0))
29 . S X=LBRYCLS,DIC="^LBRY(680,",LBRYNEW=1,DIC(0)="LNZ"
30 . D FILE^DICN S LBRYLOC=+Y
31 W !!,"Editing LOCAL SERIALS file" K DR S DIE="^LBRY(680,"
32 S DR="[LBRY LOCAL SETUP]",DIE("NO^")=1,DA=LBRYLOC,DIC=DIE
33 D LOCK^LBRYEDR G:LBRYL=0 EXIT
34 D ^DIE I '$D(^LBRY(680,DA,7)) D KILL
35 K DIE("NO^") L G:($D(Y)!($D(DTOUT))) EXIT1
36 S INACT=$P(^LBRY(680,LBRYLOC,0),U,2) I INACT]"","DCR"[INACT G START
37 G:LBRYNEW>0 COPY1
38CHECK S (COUNT,LBX)=0
39 F S LBX=$O(^LBRY(681,"AC",LBRYLOC,LBX)) Q:LBX="" S:LBX=+LBX COUNT=COUNT+1
40 G:COUNT=0 COPY1 S CNT=$P(^LBRY(680,LBRYLOC,7),U) G:COUNT'<CNT START
41 S GOOD=$O(^LBRY(681,"AC",LBRYLOC,0))
42 I GOOD=1 S DA=$O(^LBRY(681,"AC",LBRYLOC,GOOD,0)) G REPL
43COPY1 L ^LBRY(681,0) S LBRYNUM=$P(^LBRY(681,0),U,3)
44 F S LBRYNUM=LBRYNUM+1 Q:'$D(^LBRY(681,LBRYNUM,0))
45 W !!,"Entering Copy 1 information."
46 K DO S DIC="^LBRY(681,",DIC(0)="LZ",X=LBRYNUM D FILE^DICN
47 K DR S DIE=DIC,DA=+Y,DIE("NO^")=1,DR=$S(LBRYPTR&($P($G(^LBRY(680.6,LBRYPTR,0)),U,10)):"[LBRY D3]",1:"[LBRY D1]") D LOCK^LBRYEDR
48 Q:LBRYL=0 D ^DIE
49 K DIE("NO^") L G:($D(Y)!($D(DTOUT))) EXIT1
50REPL S CNT=$P($G(^LBRY(680,LBRYLOC,7)),U) G:CNT=1 EDIT
51 W !!,"Now cop",$S(CNT=2:"y 2",1:"ies 2 through "_CNT)," will be created the same as copy 1."
52 L ^LBRY(681,0) S LBRYNUM=$P(^LBRY(681,0),U,3),%X="^LBRY(681,DA,",%Y="X(" D %XY^%RCR
53 K COPYNO S LCOPY=0
54 F S LCOPY=$O(^LBRY(681,"AC",LBRYLOC,LCOPY)) Q:LCOPY="" S:LCOPY=+LCOPY COPYNO(LCOPY)=""
55 S DIK="^LBRY(681," F I=2:1:CNT S $P(X(1),U,1)=I D:'$D(COPYNO(I)) NEXT
56 K %,%H,%I,A,CNT,COUNT,D,D0,DA,DC,DE,DIC,DIE,DIFLD,DIP,Y,LBRYL
57 K X1,Y
58QUERY L W ! I LBRYNEW'=1 G START
59EDIT W !!,"Do you want to EDIT any copy now" S %=2 D YN^DICN
60 G START:%<0,START:%=2
61 I %=0 W !!,"Answering YES will allow you to modify any or all copies now." G EDIT
62 S:'$D(E0) E0=1 D CON^LBRYCSE G CONT^LBRYCSE
63NEXT F S LBRYNUM=LBRYNUM+1 Q:'$D(^LBRY(681,LBRYNUM,0)) S QUIT=$O(^LBRY(681,"AC",LBRYLOC,0)) Q:QUIT=LBRYNUM
64 S $P(X(0),U,1)=LBRYNUM,DA=LBRYNUM
65 S %X="X(",%Y="^LBRY(681,"_LBRYNUM_"," D %XY^%RCR
66 S $P(^LBRY(681,0),U,3)=LBRYNUM,$P(^(0),U,4)=$P(^(0),U,4)+1 D IX^DIK
67 W "."
68 Q
69KILL ;KILL FILE#680 RECORD IF # OF COPIES NOT SPECIFIED
70 S DIK=DIE D ^DIK Q
71EXIT K DIC("NO^") G QUERY
72EXIT1 K %,%X,%Y,J,Y,Z,YDT,DIC,INACT,LBRYNEW,LBRYL,COUNT,DIE,DIK,DR,LBRYNUM
73 K I,X,LBX,GOOD,CNT,LCOPY,COPYNO,E0,QUIT,LBRYLOC
74 Q
Note: See TracBrowser for help on using the repository browser.