Sami:

LOAD AS ASCII is going to assume that each line in the file is a new record. 
 The file you presented is not going to make a lot of sense in the context of 
LOAD.

However, if the file really contains only one entry per file, you can load it 
into a VARCHAR variable with SET vVarcharVar = ['YourFileName.DAT'] and then 
parse the data from there.  Assuming the pipe characters are reliable as 
separators, you could probably SET DELIMIT = | and use SSUB to extract each 
field from the variable (if SSUB allows VARCHAR arguments, otherwise type the 
variable as NOTE instead of VARCHAR).
--
Larry



________________________________
From: Sami Aaron <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Mon, September 20, 2010 4:26:15 PM
Subject: [RBASE-L] - Loading in VARCHAR data

Is there a way to load a text file into a VARCHAR field if there are embedded 
hard-returns within the field in the text file? Is there a setting to NOT 
assume 
the CRLF is the end of record mark?

What happens is that the end of file mark is never reached and the database 
just 
gets bigger & bigger until I kill it.

Here's what my import file looks like:

~39310~|~102991~|~102991~|~AD02956~|~Valuation for Claim No: AD02956~|~Delivery 
Date: 09/20/2010 2:12:33 PM
Company: WEST BEND MUTUAL
Claim Number: AD02956
Year: 1994
Make: KOBELCO
Model: SK400 LC III
VIN: 00570
ID: 102991
ACV: $46,793.00~|~09/20/2010 02:12PM~|~4~|~~|~X~| 

Everything from "Delivery Date" to the next "~" is data for one VARCHAR field.

Here's my code to import the file:

  SET DELIMIT=NULL
  SET DELIMIT='|'
  SET QUOTES=NULL
  SET QUOTES=~~~~
  LOAD ImportEmail FROM .xFilename_Email AS ASCII
  SET QUOTES=NULL
  SET QUOTES=''''
  SET DELIMIT=NULL
  SET DELIMIT=','

Thanks for any ideas!
Sami

____________________________
Sami Aaron
Software Management Specialists
913-915-1971
[email protected]
 Please consider the environment before printing this e-mail

Reply via email to