	parameter (n=50000)
	integer a(n)

	character*30 f1
	k=iargc()
	if(k.eq.0)then
	  write(*,*)'               usage: geteds batch'
	  write(*,*)
	  stop
	endif

	call getarg(1,f1)
	do 10 i=1,n
10	a(i)=0

	open(1,file=f1,status='old')
11	read(1,'(a)',end=99)f1
	open(2,file=f1,status='old')
	 write(*,*)f1
12	read(2,*,end=98)k
	a(k)=1
	goto 12
98	close(2)
	goto 11

99	close(1)
	k=0
	open(1,file='eds.dat',status='unknown')
	do 20 i=1,n
	if(a(i).ne.0)write(1,'(i6)')i
20	if(a(i).ne.0)k=k+1	
	write(*,*)k
	close(1)
	end
