Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: LRULEN

LRULEN.m

Go to the documentation of this file.
LRULEN ; IHS/DIR/FJE - BYTE COUNT FOR ACCESSIONS 5/9/91 18:19 ;
 ;;5.2;LR;**1013**;JUL 15, 2002
 ;
 ;;5.2;LAB SERVICE;;Sep 27, 1994
 W !!?20,"Byte count for accessions"
 S DIC=68,DIC(0)="AEMOQZ",DIC("S")="I ""SPCYEM""[$P(^(0),U,2)&($P(^(0),U,2)]"""")" D ^DIC K DIC G:Y<1 END S LRAA(1)=$P(Y,U,2),LRAA=+Y,LRSS=$P(Y(0),U,2) D XR^LRU
 D B^LRU G:Y<0 END
 S ZTRTN="QUE^LRULEN" D BEG^LRUTL G:POP!($D(ZTSK)) END
QUE U IO S (C,S)=0,LRSDT=LRSDT-.0001,LRLDT=LRLDT+.9
 F LRSDT=LRSDT:0 S LRSDT=$O(^LR(LRXR,LRSDT)) Q:'LRSDT!(LRSDT>LRLDT)  F LRDFN=0:0 S LRDFN=$O(^LR(LRXR,LRSDT,LRDFN)) Q:'LRDFN  F A=0:0 S A=$O(^LR(LRXR,LRSDT,LRDFN,A)) Q:'A  D A
 W !!,"ACCESSIONS: ",S," BYTES: ",C,"  AVERAGE BYTES/ACCESSION: ",$S(C:C\S,1:0),!,"From ",LRSTR," to ",LRLST
 D END^LRUTL,END Q
A S S=S+1,C=C+$L(^LR(LRDFN,LRSS,A,0))
 I $D(^LR(LRDFN,LRSS,A,2,0)) S C=C+$L(^(0)) F T=0:0 S T=$O(^LR(LRDFN,LRSS,A,2,T)) Q:'T  S C=C+$L(^(T,0)) D M
 Q
M I $D(^LR(LRDFN,LRSS,A,2,T,2,0)) S C=C+$L(^(0)) F M=0:0 S M=$O(^LR(LRDFN,LRSS,A,2,T,2,M)) Q:'M  S C=C+$L(^(M,0)) D E
 F B=1,3,4 I $D(^LR(LRDFN,LRSS,A,2,T,B,0)) S C=C+$L(^(0)) F M=0:0 S M=$O(^LR(LRDFN,LRSS,A,2,T,B,M)) Q:'M  S C=C+$L(^(M,0))
 I $D(^LR(LRDFN,LRSS,A,2,T,5,0)) S C=C+$L(^(0)) F M=0:0 S M=$O(^LR(LRDFN,LRSS,A,2,T,5,M)) Q:'M  S C=C+$L(^(M,0)) I $D(^LR(LRDFN,LRSS,A,2,T,5,M,1,0)) S C=C+$L(^(0)) D N
 Q
E I $D(^LR(LRDFN,LRSS,A,2,T,2,M,1,0)) S C=C+$L(^(0)) F E=0:0 S E=$O(^LR(LRDFN,LRSS,A,2,T,2,M,1,E)) Q:'E  S C=C+$L(^(E,0))
 Q
N F N=0:0 S N=$O(^LR(LRDFN,LRSS,A,2,T,5,M,1,N)) Q:'N  S C=C+$L(^(0))
 Q
 ;
END D V^LRU Q