source: WorldVistAEHR/trunk/r/LIBRARY-LBR-LBRS/LBRYPG.m@ 1710

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

initial load of WorldVistAEHR

File size: 2.8 KB
RevLine 
[613]1LBRYPG ;ISC2/DJM-LIBRARY SERIALS PURGE OPTION ;[ 11/26/97 4:34 PM ]
2 ;;2.5;Library;**2**;Mar 11, 1996
3 I $G(LBRYPTR)="" D I $G(LBRYPTR)="" W !!,$C(7),"No Site has been selected" Q
4 . D ^LBRYASK
5 S KL1=1 D CKIN G:Y<0 EXIT
6 D ALL^LBRYPG0 G:$D(ALL) NOT
7CONT S (E,E0,E1)=0 D MORE
8 G:'$D(A(1)) EMPTY
9CONT1 S E=1
10INIT S E1=E-3 S:E1<1 E1=1 S E0=E1 D FWD1^LBRYPG0 G DISPLAY
11CKIN W @IOF,?5,"VA Library Serials Purge for "_LBRYNAM
12 S (YDT1,Y)=DT X ^DD("DD") W ?60,Y,! S YDT=Y
13 S DIC="^LBRY(680,",DIC(0)="AEQZ",DIC("S")="I $P(^(0),U,4)=LBRYPTR&($P(^(0),U,2)="""")"
14 D ^DIC K DIC("S")
15 Q:Y<0 S (DA,LBRYLOC)=$P(Y,U),LBRYCLS=$P(Y,U,2)
16 S LA0=$P(^LBRY(680.5,LBRYCLS,0),U),LA00=""
17 S:$D(^LBRY(680,LBRYLOC,1)) LA00=" "_$P(^(1),U,5)
18 S LA0="TITLE: "_LA0
19 Q
20MORE K A S N="",A(1)="",LA1="JOURNAL",LA2="DATE",LA3="V(I)",LA4="CPY'S"
21 S LA5="COPIES",LA6="RECEIVED",LA7="ORD'D",LA8="COMPLETED"
22 S LA9="DISPOSITION",LA10="RCV'D"
23 F I=1:1 S:A(I)="" N=$O(^LBRY(682,"AC",LBRYLOC,N)) G:N="" MORE1 D
24 . S A(I)=$O(^LBRY(682,"AC",LBRYLOC,N,A(I)))
25 . S:$O(^LBRY(682,"AC",LBRYLOC,N,A(I)))>0 A(I+1)=A(I)
26 . S:$O(^LBRY(682,"AC",LBRYLOC,N,A(I)))="" A(I+1)=""
27MORE1 S II=E K A(I) Q
28DISPLAY ; Show issues
29DISP0 W @IOF,?5,"VA Library Serials Purge",?60,YDT
30 W !!,LA0,!,LA00,!!,"ID",?6,LA1,?41,LA2,?52,LA4,?59,LA4,?66,LA9
31 W !,"NUM",?7,LA2,?20,LA3,?41,LA6,?52,LA7,?59,LA10,?66,LA8,!
32 F I=1:1:77 W "-"
33 W !
34 S AA="",RTD=0 G:E0=0 ASK1 G:'$D(A(1)) ASK1
35 F I=E0:1:E1 S AA=^LBRY(682,A(I),1),RTD=0,RFLAG=0,MR=0,RTD1="" D RTED,DISPX,DISP1
36 ; Display to user the options
37ASK1 D ^LBRYPG1
38 ; Go select user's option. State error prompt if needed
39ASK3 G ASK3^LBRYPG1
40RTED S MR=$O(^LBRY(682,A(I),4,MR)) Q:MR=""!(MR?.AP)
41 S BB=^LBRY(682,A(I),4,MR,0),BB2=$P(BB,U,2),BB1=$P(BB,U,1)
42 S:BB2<4&(BB1'="ToC") RTD=RTD+1 S:BB1="ToC" BB1="T"
43 I BB2<4,RTD<5 S RTD1=RTD1_BB1_"," G RTED
44 I BB2<4,RTD'<5,RFLAG=0 S RTD1=$E(RTD1,1,$L(RTD1)-1)_"...",RFLAG=1
45 G RTED
46DISPX S AA1=$P(AA,U,1),AA2=$P(AA,U,2),AA3=$P(AA,U,3),AA4=$P(AA,U,4)
47 S AA5=$P(AA,U,5),AA6=""
48 S:$D(^LBRY(682,A(I),1)) AA6=$P(^(1),U,7) I AA4=0 S AA4=""
49 S RTDA=$S(RTD=AA5:" ALL",1:RTD1)
50 S:AA3'="" AA2=AA2_"("_AA3_")"
51 S Y=AA1 X ^DD("DD") S AA1=Y
52 I AA6'="" S Y=AA6 X ^DD("DD") S AA6=Y
53 Q
54DISP1 W !,I,?5,AA1,?18,AA2,?40,AA6,?54,AA5,?61,AA4,?66,RTDA
55 Q
56EMPTY W !!,"This title has nothing checked-in so there is nothing to PURGE." G NOT1
57NOT W !!,LA0,!!,"This title is not fully initialized."
58 W !,"Please use Library Serials Management to set up this title."
59NOT1 S XZ="Exit// " D PAUSE^LBRYUTL K XZ
60 G LBRYPG
61EXIT K %,%DT,%X,LA0,LA1,LA2,LA3,LA4,LA5,LA6,LA7,LA8,LA9,LA10,A,I,II,IA,I1
62 K J,AA,AA1,AA2,AA3,AA4,AA5,AA6,AA7,AA8,AB,AB1,AB2,CA,CA1,DIC,DIW,DIWF
63 K DIWL,DIWR,DIWT,DIWTC,DIWX,CLR,LL,DN,DR,DX,DY,N,O,X1,X2,XX,Z,LB,LB1
64 K LB2,MM,RFLAG,RTD,RTD1,RTDA,XT1,XT2,XT3,YDT,YDT1,DA,LBRYCLS,LBRYLOC
65 K Z,ALL,DIK,G,G1,G2,Q,CNT,IT,LOOPX,QTY,BB,BB1,BB2,E,E0,E1,KL1,LA00,MR
66 Q
Note: See TracBrowser for help on using the repository browser.