	character*60 f1
	logical logi
	write(*,*)
	write(*,*)'           ******** take fits_head ******2001,10'
	write(*,*)' '
	if(iargc().ne.0)then
	  call getarg(1,f1)
	  goto 10
	endif
20	write(*,'(a,$)')'Input *.fits_names: '
	read(*,'(a)')f1
10	k=index(f1,'.')
	if(k.eq.0)f1=f1(1:lnblnk(f1))//'.fits'
	inquire(file=f1,exist=logi)
	if(.not.logi)then
	  write(*,*)' file not found !'
	  goto 20
	endif
	write(*,'(2a)')'FILE: ',f1(1:lnblnk(f1))
	write(*,*)

	call readata(f1)
	end
	
	subroutine readata(f1)
	character*60 f1
	character*80 ch(108),a
	nn=80*108
	open(3,file=f1,status='old',access='direct',recl=nn)	
	read(3,rec=1)ch
	do 10 i=1,108
	a=ch(i)
	write(*,'(a)')a(1:lnblnk(a))
10	if(a(1:8).eq.'END     ')return
	end
