C************************************************************************
C*
C*  COPYRIGHT (c) 1981,1983,1984,1987,1988
C*  Westinghouse Electric Corporation
C*
C*  THIS SOFTWARE IS FURNISHED WITHOUT LICENSE AND MAY BE USED AND
C*  COPIED ONLY WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE.
C*
C*  THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
C*  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY WESTINGHOUSE.
C*
C*  WESTINGHOUSE ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
C*  OF THIS SOFTWARE.
C*
C****************************************************************************
      Subroutine create

      implicit integer (a-z)

      include 'iodef'
      logical exists, new
      character*255 dev

      call check_file (exists, new)

      if (exists) then
        if (new) then
          write (6,*) 'A Softquota data file already exists'
        else
          write (6,*) 'An old Softquota data file exists.  It will be ',
     1                'translated.'
          call translate
        end if
      else
        call lib$get_lun(new_file)
        loc = index(drive(1:drive_len),':')
        if (loc .ne. 0) then
          drive_len = loc	!Rooted device or device ending with ":"
        else
          drive_len = drive_len + 1
          drive (drive_len:drive_len) = ':'
        endif
        dev = drive(1:drive_len)//DataFile
c        open (unit=new_file, file='softquota.dat',
c        write (6,*) dev
        pause
        open (unit=new_file, file=dev,
     1        status='NEW', organization='INDEXED', access='KEYED',
     2       recordtype='FIXED', form='UNFORMATTED',recl=4,
     3       key=(1:4:integer, 1:2:integer, 3:4:integer),
     4       iostat=ios, shared)
        close (unit=new_file)
        call lib$free_lun(new_file)
      end if

      return
      end
