Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 Fluke 1/4/84; site fluke.UUCP Path: utzoo!watmath!clyde!burl!mgnetp!ihnp4!houxm!houxz!vax135!cornell!uw-beaver!ssc-vax!fluke!rzdz From: rzdz@fluke.UUCP (Rick Chinn) Newsgroups: net.micro Subject: dbase ii files Message-ID: <342@tpvax.fluke.UUCP> Date: Tue, 7-Aug-84 12:55:13 EDT Article-I.D.: tpvax.342 Posted: Tue Aug 7 12:55:13 1984 Date-Received: Fri, 10-Aug-84 01:58:20 EDT Distribution: net Organization: John Fluke Mfg. Co., Everett, WA Lines: 92 re: dbase database files and other programs. Yes, you can create a dbase file from another program's datatfile. The easiest way is to have the datafile in comma delimited form (each field delimited with commas, fields with embedded commas must be quoted). Then use the append delimited (I'm not sure of the syntax because the docs aren't here at work) command. Check your user manual. I've used the command to add a Mailmerge datafile to a dbase datafile. It worked fine. You can also go the other way very easily (dbase --> comma delimited). I do that a lot do create form letters that I merge print. A last possibility is to create a program that reads the database and creates a dbase formatted file. Back in march, dNews published the "Structure of the Structure". Here it is: Structure of DATA files. Byte Contents Meaning 0 02H dbase II database file 1-2 16 bit no. Number of records in this database 3-5 3 bytes Date of last update (MM DD YY) binary 6-7 16 bit no. Size of the record 8-519 32x16 byte field descriptors array: byte 0-9 field name in ASCII, zero filled byte 10 hex zero byte 11 field type; "C", "N", or "L", in ASCII byte 12 field size in binary byte 13-14 absolute adress where field is located in memory (16 bit number) byte 15 number of decimals in binary Field descriptors are terminated by a carriage return (0DH) 520 1 byte Field terminator (0Dh) if all 32 fields are present, otherwise null (0H). Notes: 1. Data records are preceded by one byte that is a space (20H) if the record is not deleted, and an asterisk (2AH) if it is deleted. 2. Data fields are packed into records with no separators or record terminators. Structure of Floating-Point Numbers: Byte Contents Meaning 0 1 bit sign bit - 1 = negative 7 bits exponent biased by 40H 1-n packed decimal mantissa Notes: 1. n = 5 for standard dbase. 2. 0 = 00 00 00 00 00 00 1 = 40 10 00 00 00 00 -1 = C0 10 00 00 00 00 .1 = 3F 10 00 00 00 00 123 = 42 12 30 00 00 00 Structure of Character Strings: Byte Contents Meaning 0 8 bit no. number of characters in string 1-n bytes data bytes e.g. "ABC" = 03 41 42 43 | A B C \--- 3 characters That's it, straight from the horses mouth. Rick Chinn John Fluke Mfg. Co MS 232E PO Box C9090 Everett WA 98206 ihnp4!uw-beaver----\ decvax!microsof \ ucbvax!lbl-csam \ +====!fluke!rzdz sun / sb1!allegra / ssc-vax------------/ (206) 356-5232