c c determine number of reclassifications c distribution by age at classification, agej c distribution by judgID c distribution by year-month of classification c parameter (no=25) character*12 anim,farm,prev integer judgID integer mcod(30),tr(no),kpar,jdate,bdate,cdate, x agej,agec,kcod,ageg integer yrmo(3000,13),jugc(3000),aged(200) nmj=0 nob=0 nrec=0 prev=' ' yrmo=0 jugc=0 aged=0 open(10,file='TYP04.d',form='formatted',status='old') open(15,file='TYP05.d',form='formatted',status='unknown') c 10 read(10,1515,end=88)anim,farm,jdate,bdate,cdate,agej, x agec,judgID,kpar,kcod,tr 1515 format(1x,a12,1x,a12,3i9,2i7,i6,2i3,25i3) nob=nob+1 jyy = jdate/10000 jmm = (jdate - jyy*10000)/100 if(jyy.lt.1990)then jyy=1989 jmm=6 jdate = jyy*10000 + jmm*100 + 1 endif yrmo(jyy,jmm)=yrmo(jyy,jmm)+1 yrmo(jyy,13)=yrmo(jyy,13)+1 c ka=agej if(ka.gt.200)ka=200 c make 25 age groups ageg=1 if(ka.gt.24)ageg=ka - 23 if(ka.gt.37)ageg=15 if(ka.gt.39)ageg=16 if(ka.gt.41)ageg=17 if(ka.gt.43)ageg=18 if(ka.gt.45)ageg=19 if(ka.gt.47)ageg=20 if(ka.gt.50)ageg=21 if(ka.gt.53)ageg=22 if(ka.gt.56)ageg=23 if(ka.gt.59)ageg=24 if(ka.gt.62)ageg=25 aged(ageg)=aged(ageg)+1 c c 1 is added to judge IDs because 0 is a valid ID c judgID=judgID+1 k=judgID if(k.eq.6)k=31 if(k.eq.22)k=31 if(k.eq.30)k=31 if(k.eq.35)k=31 judgID = k jugc(k)=jugc(k)+1 write(15,1601)anim,farm,jdate,bdate,agej, x ageg,judgID,kpar,kcod,tr 1601 format(1x,a12,1x,a12,2i9,2i5,i6,2i3,25i3) c 13 14 26 44 54 60 66 141 c -r142 -ka15a19 farm-yyyymm if(anim.eq.prev)go to 10 prev=anim nrec=nrec+1 go to 10 88 close(10) print *,nob,nrec print *,'Year-Months' do 91 k=1,3000 if(yrmo(k,13).gt.0)then print 1333,k,(yrmo(k,j),j=1,12) 1333 format(1x,i5,12i7) endif 91 continue print *,'Ages at Classification' do 93 k=1,200 if(aged(k).gt.0)then print 1333,k,aged(k) endif 93 continue c print *,'Judges' do 95 k=1,40 if(jugc(k).gt.0)then print 1334,k,jugc(k) 1334 format(1x,i6,1x,i8) endif 95 continue stop end