	subroutine get_file(sid)
*
*			specifications
*
	integer*4 sid

	include 'dccom.inc'
	parameter (n_ignore = 5)
	character*3 ignore(n_ignore) /'DIR','OBJ','LIS','MAP','HDR'/
	integer get_file_info, get_dir_info
        character*256 temp
	integer tlen
	real*8 crebuf, revbuf
	character*17 credate,revdate
*
*			code section
*
	if (eos(sid)) return
100	    continue
	    if (indirect(sid)) then
		read (unit=iunit(sid),fmt='(q,a)',end=200) tlen, temp
		ibl = index(temp(:tlen),' ')
		if (ibl.eq.0) ibl = tlen + 1
		fspec(sid) = temp(:ibl-1)
		istat = .true.
	    else
	        istat = lib$find_file(wspec(sid), fspec(sid),
     +           context(sid),'sys$disk:*.*;0')
	    endif
	    if (istat) then
		total_files(sid) = total_files(sid) + 1
	        call parse(sid)
	 	do i = 1,n_ignore
		    if (type(sid).eq.ignore(i)) goto 100
		enddo
		total_checked(sid) = total_checked(sid) + 1
		if (fspec(sid)(lbracket(sid):rbracket(sid)).ne.
     +		 dirsave(sid)) then
		    printed = .false.
		    dirsave(sid) = fspec(sid)(lbracket(sid):rbracket(sid))
		endif
		if (indirect(sid)) then
		    istat2 = get_dir_info(temp(:tlen),alloc(sid),used(sid),
     +		     credate,revdate)
		    cre(sid) = credate(1:7)//credate(10:17)
		    rev(sid) = revdate(1:7)//revdate(10:17)
	        else
		    istat2 =  get_file_info(fspec(sid)(:index(fspec(sid),' ')),
     +               alloc(sid), used(sid),
     +	             crebuf, revbuf)
		    call sys$asctim(,credate,crebuf,)
		    call sys$asctim(,revdate,revbuf,)
		    cre(sid) = credate(1:7)//credate(10:17)
		    rev(sid) = revdate(1:7)//revdate(10:17)
		endif
	 	if (.not.istat2) then
		    if (out_file) then
			write(6,1000) fspec(sid)(:index(fspec(sid),' '))
		    endif
	  	    goto 100
		endif
	    else
200	        continue
	        eos(sid) = .true.
	        call str$dupl_char(fspec(sid),len(fspec(sid)),255)
	        call str$dupl_char(file(sid),len(file(sid)),255)
	        call str$dupl_char(type(sid),len(type(sid)),255)
	        call str$dupl_char(version(sid),len(version(sid)),255)
	    endif
*
*		format statements
*
1000	format('0Error opening: ',a,//)
	end
