home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / d / decode10.zip / DBASE2.RUL < prev    next >
Text File  |  1992-12-07  |  2KB  |  90 lines

  1. ############################################################################
  2. #                                                                          #
  3. # dbase2.rul -- Decode It! rule file for dBASE II DBF files                #
  4. #               (dBASE is a registered trademark of Borland International) #
  5. #                                                                          #
  6. # Please note: This rule file is provided as an example only.  While       #
  7. #              every effort has been made to validate the information      #
  8. #              presented here, Axiom Innovations takes no responsibility   #
  9. #              for the integrity of the data that results from using       #
  10. #              this example.                                               #
  11. #                                                                          #
  12. ############################################################################
  13.  
  14. # dBASE II Header area
  15. RECORD  Header
  16.  
  17.   # Version should be equal to 2
  18.   TINY  Version
  19.  
  20.   WHILE  Header.Version <> 2
  21.      EXIT
  22.  
  23.   # Number of records in the database
  24.   SHORT  Record_Number
  25.  
  26.   # Month of last edit date
  27.   TINY   Month
  28.  
  29.   # Day of last edit date
  30.   TINY   Day
  31.  
  32.   # Year of last edit date
  33.   TINY   Year
  34.  
  35.   # Record size in bytes
  36.   SHORT  Record_Size
  37.  
  38. END
  39.  
  40.  
  41. # Field definitions
  42. RECORD  Field  33
  43.  
  44.   # Field name, left justified, zero-filled
  45.   WHILE  Field.Name  <>  13
  46.     ASCII  Name  11
  47.   (OMIT0)  Field.Name
  48.  
  49.   # CR is the End of Fields marker
  50.   WHILE  Field.Name  <=>  13
  51.     BREAK
  52.  
  53.   # Field type: C, N, L, D, or M
  54.   ASCII   Type
  55.   
  56.   # Field length
  57.   TINY    Length 
  58.  
  59.   # Field data address (not very useful).
  60.   XSHORT  Address
  61.  
  62.   # Number of decimals
  63.   TINY    Decimal_Digits
  64.  
  65. END
  66.  
  67.  
  68. WHILE  .OFFSET  <  521
  69.   TINY  Not_Used -1
  70. (OMIT0)  Not_Used
  71.  
  72.   
  73. # Actual database
  74. RECORD  DBASE2_Record  Header.Record_Number
  75.  
  76.   # Deleted records contain an asterisk ('*') in first byte
  77.   # Normal records contain a space in first byte
  78.   ASCII  Deleted_Flag
  79.  
  80.   ASCII  Info  -1
  81.  
  82. END  Header.Record_Size
  83.  
  84.  
  85. # End of file
  86. TINY  EndOfFile
  87.  
  88. EXIT
  89.  
  90.