home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / watup.zip / READ_ME.DOC < prev   
Text File  |  1985-06-11  |  2KB  |  41 lines

  1. The procedure 'WATUP' is designed to be incorporated into dBase III
  2. Procedure Files and keeps track of which files are currently open
  3. and in which work area's. It allows a calling program to open and close
  4. files by name, therefore offering work area independance. 
  5.  
  6. It is called with four positional parameters, the first is the action 
  7. desired, where 1 = open a file, 2 = close a file and 3 = close all files. 
  8. The second is a numeric memory variable in which the subroutine returns 
  9. the work area of the file in question. The third is a numeric memory 
  10. variable containing the number of files associated with the request 
  11. i.e. an indexed file = 2, an indexed file with a memo field = 3. 
  12. The fourth is the name of the file to be acted upon (without an extension).
  13.  
  14. Before calling the routine the first time it is neccessary to initialize
  15. the following memory variables - wanum = 0, wanam = SPACE(80), 
  16. wano = '0000000000', files = n where 'n' = number of command files open
  17. during data file processing. Examples of calls to the subroutine
  18. are as follows:
  19.  
  20. 1. To open an indexed file called 'orders'
  21.  
  22. CALL watup WITH 1,wanum,2,'orders  '
  23. USE &wanum
  24. SELECT orders INDEX ordndx
  25.  
  26. 2. To close an index file called 'orders'
  27.  
  28. CALL watup WITH 2,wanum,2,'orders  '
  29. USE &wanum
  30. SELECT
  31.  
  32. 3. To close all database files
  33.  
  34. CALL watup WITH 3,0,0,''
  35.  
  36. The memory variable 'files' is available at all times and contains the
  37. total number of files of all types open (including command files).
  38. The subroutine assumes that the calling command files know what they 
  39. are doing and therefore does not handle errors gracefully.
  40.  
  41. John Dobson, Unique Systems Ltd, PO Box 19730, Christchurch, New Zealand.