c c number Year-Month-Judge subclasses (up to 14,000) c parameter (no=25) character*12 anim,farm,prev integer judgID,pyrmo integer mcod(30),tr(no),kpar,jdate,bdate, x agej,ageg,kcod integer nss ihys=0 nob=0 pyrmo=0 prev=' ' open(10,file='TYP06S.d',form='formatted',status='old') open(15,file='TYP07.d',form='formatted',status='unknown') c 10 read(10,1607,end=88)anim,iam,farm,jdate,bdate,agej, x ageg,judgID,nss,jhys,kpar,kcod,tr nob=nob+1 jyrmo=jdate/100 if(jyrmo.ne.pyrmo.or.farm.ne.prev)then ihys=ihys+1 pyrmo=jyrmo prev=farm endif write(15,1607)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 go to 10 88 close(10) print *,nob,ihys stop end