Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can dBase Use Delimited Files?

Status
Not open for further replies.

stutyr

Programmer
Jan 18, 2009
1
Hi,
A commercial system that I am working with only exports delimited files. I am able to append these records into a dbase file, but I dont know how to parce the individual fields. In a structured file, I would normally use REPL field WITH SUBSTR(temp,1,10), etc, but that doesn't work for a delimited file, because every record is positionally different.

Does anyone have a suggestion?

Thanks much
 
stutyr,

Yes you can, you just have to have the structure of the receiving file laid out in the same manner as the ASCII file. It will load field for field into that structure. You could actually load the delimited files to a spreadsheet and then convert to a dbf if needed. You just have to deal with EXCEL playing with you're data on the way out.

Jim C.
 
From the dBase Plus Language reference

(This works in DOS versions of dBase, too.)


APPEND FROM <filename> DELIMITED [WITH <char> | BLANK]]

<filename>
The name of the file whose records you want to append to the current table.FOR <condition>
Restricts APPEND FROM to records in <filename> that meet

DELIMITED
A text file with fields separated by commas. These files are also referred to as CSV (Comma Separated Value) files. Character fields may be delimited with double quotation marks; the quotes are required if the field itself contains a comma.
Each carriage return and linefeed indicates a new record. If you don't specify an extension, dBASE Plus assumes .TXT.

DELIMITED WITH <char>
Indicates that character data is delimited with the character <char> instead of with double quotes. For example, if delimited with a single quote instead of a double quote, the clause would be: DELIMITED WITH '

DELIMITED WITH BLANK
Indicates that data is separated with spaces instead of commas, with no delimiters.
DELIMITED WITH

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top