c c number animals c parameter (no=25, nam=1000000) character*12 oid(nam),anim,farm,prev,isir,idam,ianm integer judgID,pyrmo integer mcod(30),tr(no),kpar,jdate,bdate,iam, x agej,ageg,kcod integer nss,newnum(nam) nob=0 pyrmo=0 prev=' ' oid=prev mam=0 open(10,file='PEDA2S.d',form='formatted',status='old') open(11,file='TYP07.d',form='formatted',status='old') open(15,file='TYP08.d',form='formatted',status='unknown') c 10 read(10,1001,end=20)knum,ianm,isir,idam,kgen 1001 format(1x,i10,1x,a12,1x,a12,1x,a12,1x,i4) mam=mam+1 oid(mam)=ianm newnum(mam)=knum go to 10 20 print 1701,mam 1701 format(1x,i10,' pedigrees in') close(10) c nob=0 nout=0 21 read(11,1607,end=88)anim,iam,farm,jdate,bdate,agej, x ageg,judgID,nss,ihys,kpar,kcod,tr 1607 format(1x,a12,i10,1x,a12,2i9,3i5,2i8,2i3,25i3) c 13 23 24 36 54 69 85 91 166 c -r167 -ka25a19 farm-yyyymm nob=nob+1 kw = luchs(anim,oid,mam) if(kw.lt.1)go to 21 iam = newnum(kw) write(15,1607)anim,iam,farm,jdate,bdate,agej, x ageg,judgID,nss,ihys,kpar,kcod,tr nout=nout+1 go to 21 88 close(11) print *,nout,nob,' records out' close(15) stop end include 'lupch.f'