source: WorldVistAEHR/trunk/r/LIBRARY-LBR-LBRS/LBRYSTA.m@ 1240

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

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1LBRYSTA ;ISC2/DJM-SERIALS STATISTICAL REPORT ;[ 05/23/97 12:13 PM ]
2 ;;2.5;Library;**2**;Mar 11, 1996
3 ;
4START W @IOF,!,?5,"VA Library Serials Statistical Report for "_LBRYNAM
5 S Y=DT X ^DD("DD") S YDT=Y W ?60,YDT,!
6S1 W !,"Please enter the Month and Year for the Statistical Counts Report."
7 S %DT="AE",%DT(0)="-NOW" D ^%DT G:Y<0 EXIT
8 S MO=$E(Y,4,5) I +MO=0 W !!,"You must enter a month." G S1
9 S (LBTIME,LBDT)=$E(Y,1,5)_"00"-.0001,(LBCR,LBCRR,LBTR,LBTRR,LBTOT)=0
10 F S LBTIME=$O(^LBRY(682,"A3",LBTIME)) Q:LBTIME'>0 Q:$E(LBTIME,4,5)'=MO S TITLE=0 D S2
11 K ^TMP($J,DUZ)
12 F S LBDT=$O(^LBRY(682,"A4",LBDT)) Q:LBDT'>0 Q:$E(LBDT,4,5)'=MO D S1A
13 G S1B
14S1A S (X4,X5)=0
15 F S X4=$O(^LBRY(682,"A4",LBDT,X4)) Q:X4'>0 D
16 . F S X5=$O(^LBRY(682,"A4",LBDT,X4,X5)) Q:X5'>0 D
17 .. I $G(^LBRY(682,X5,0))="" K ^LBRY(682,"A4",LBDT,X4,X5) Q
18 .. I $P(^LBRY(682,X5,0),U,4)'=LBRYPTR Q
19 .. I '$D(^TMP($J,DUZ,X4,X5)) S ^(X5)="",LBTOT=LBTOT+1
20 Q
21S1B W !!,"ISSUES ROUTED: ",LBCR,?30,"NUMBER OF RECIPIENTS ROUTED TO: ",LBCRR
22 W !!,"ToC ISSUES ROUTED: ",LBTR,?30,"NUMBER OF ToC RECIPIENTS ROUTED TO: ",LBTRR
23 W !!,"TITLES WITH CHECK-IN ACTIVITY: ",LBTOT
24 K ^TMP($J,DUZ)
25 W ! S XZ="Exit// " D PAUSE^LBRYCK0 K XZ G START
26S2 F S TITLE=$O(^LBRY(682,"A3",LBTIME,TITLE)) Q:TITLE'>0 D
27 . I $G(^LBRY(682,TITLE,0))="" K ^LBRY(682,"A3",LBTIME,TITLE) Q
28 . I $P(^LBRY(682,TITLE,0),U,4)'=LBRYPTR Q
29 . S TITLE1=0 F S TITLE1=$O(^LBRY(682,"A3",LBTIME,TITLE,TITLE1)) Q:TITLE1'>0 D
30 .. S XX=$G(^LBRY(682,TITLE,4,TITLE1,0)) I XX'="" D MORE
31 .. I XX="" K ^LBRY(682,"A3",LBTIME,TITLE,TITLE1)
32 Q
33MORE S X1=$P(XX,U,3),(X2,X3)=0
34 F S X2=$O(^LBRY(681,X1,2,X2)) Q:X2'>0 S X3=X3+1
35 I $P(XX,U,1)'="ToC" S LBCR=LBCR+1,LBCRR=LBCRR+X3 Q
36 S LBTR=LBTR+1,LBTRR=LBTRR+X3
37 Q
38EXIT K YDT,%DT,MO,I,J,K,LBTIME,LBDT,LBCR,LBCRR,LBTR,LBTRR,LBTOT,TITLE
39 K TITLE1,XX,X1,X2,X3,X4,X5
40 Q
Note: See TracBrowser for help on using the repository browser.