anchor.diff:              line = line+1
               do k=1, int(nfield)
                   ! if is a numeric field
  -                if (vartype(k) == 'N') then
  -                    read (unit=1, pos=p) li
  -                    write (2,numfor) li, ','
  +                if (vartype(k) == 'N' .and. strewrdnum(k)>0) then
  +                    read (unit=1, pos=p,err=99) li
  +                    if (li>-9.9E29 .and. li<9.9E29) then 
  +                        write (2,numfor,err=99) li, ','
  +                    else 
  +                        if (li<=-9.9E29) write (2,'(A,A,$)',err=99) '   ' , ','
  +                        if (li>= 9.9E29) write (2,'(A,A,$)',err=99) 'inf' , ','
  +                    end if
                       p=p+8
  +                end if
  +                if (vartype(k) == 'N' .and. strewrdnum(k)==0) then
  +                    write (2,numfor,err=99) defaultval(k), ','
                   end if 
                   ! if is string caracter
                   if (vartype(k)=='A') then
  -					read (unit=1, pos=p) text4
  -					write (2,'(A,A,$)',advance='no') text4, ','
  -					p=p+8
  +                    read (unit=1, pos=p,err=99) text4
  +                    if(k<nfield .and. varnames(k)==varnames(k+1) .and. numofwords(k)==numofwords(k+1)-1) then
  +                        write (2,'(A,$)',advance='no',err=99) text4
  +                    else
  +                        write (2,'(A,A,$)',advance='no',err=99) text4, ','
  +                    end if 
  +                    p=p+8
                   end if 
               end do
  -            write (2,*) line
  +            write (2,*,err=99) line
           end do
           p= i*4096+1 !next page position
       end do
  +    
       
       !read last page
       do j=1, int(nreclastpage)
           line = line+1
           do k=1, int(nfield)
               ! if is a numeric field
  -            if (vartype(k) == 'N') then
  -                read (unit=1, pos=p) li
  -                write (2,numfor) li, ','
  +            if (vartype(k) == 'N' .and. strewrdnum(k)>0) then
  +                read (unit=1, pos=p,err=99) li
  +                if (li>-9.9E29 .and. li<9.9E29) then
  +                    write (2,numfor,err=99) li, ','
  +                else 
  +                    if (li<=-9.9E29) write (2,'(A,A,$)',err=99) '   ' , ','
  +                    if (li>= 9.9E29) write (2,'(A,A,$)',err=99) 'inf' , ','
  +                end if
                   p=p+8
  +            end if 
  +            if (vartype(k) == 'N' .and. strewrdnum(k)==0) then
  +                write (2,numfor,err=99) defaultval(k), ','
               end if 
               ! if is string caracter
               if (vartype(k)=='A') then
  -                do l=1, numofwords(i)
  -                    read (unit=1, pos=p) text4
  -                    write (2,'(A,A,$)',advance='no') text4, ','
  -                    p=p+8
  -                end do 
  -            end if 
  +                read (unit=1, pos=p,err=99) text4
  +                if(k<nfield .and. varnames(k)==varnames(k+1) .and. numofwords(k)==numofwords(k+1)-1) then
  +                    write (2,'(A,$)',advance='no',err=99) text4
  +                else
  +                    write (2,'(A,A,$)',advance='no',err=99) text4, ','
  +                end if 
  +                p=p+8
  +            end if  
           end do
           write (2,*) line
       end do
  
positive.code:     write (*,*) '*****************************************'
      
      ! read data
      
      p=4097
      line = 0
  
negative.code: 
      
      ! tmp variables
      character*4 text4, text4b
      character*8 text8, text8b
      character*16 text16
      real*8 li
  