        subroutine rasfile_smb(ifile,name)
	include 'Online.cmm'
	integer system
        character*40 name
        character*50 fname
        character*80 dname,wname
        character*100 gname
        character*250 smbcom
        character*80 string
        dname='/group/atlas/BOL/RASRES/'//name
        wname='/group/atlas/BOL/RASRES/'//'rasmoni'
        fname='get '//name
        gname=fname//' /group/atlas/BOL/RASRES/rasmoni\''
        smbcom='smbclient \'\\\\kakap\\Ddisk\' \'BOLroom\'
     +  -U MDToper -D \'Results/Daily\' -c \''//gname
        open(29,file='getras.exe')
        write(29,*)smbcom
        close(29)
        istat = system
     +    ('rm /group/atlas/BOL/RASRES/rasmoni')
        istat = system ('chmod +x getras.exe')
        istat = system ('getras.exe')
        istat = system
     +    ('chmod g+w /group/atlas/BOL/RASRES/rasmoni')
        print *, 'smb ended with status ', istat
	open(ifile,file=wname)
	read(ifile,'(a)',ERR=199,END=199)string
        rewind(ifile)
        print *,'RasRes file available now'
        goto 200
C if not exist give message
 199	print *,' RasRes file does not exist ',dname
 200	continue
        end


