Re: dbload Using Native Types
Posted in 1996
rcave@condor.peregrine.com (Richard Cave) wrote:
:I'm trying (unsuccessfully) to use dbload on a text file that contains
:native types for integer and double.
You mean there is binary data - so it is no text file, but a datafile?
: Seems that dbload doesn't recognize
:native types but will recognize an ascii character (e.g. integer type vs. '1').
Yes, dbload can only load ascii type data.
:I'm using dbload on a character-position text file, so I have the
:constraint that the integer must be 4 bytes and the double 8 bytes. If I
:convert these values to char form, they could easily go over these
:byte boundary limits.
Why do you have this limit. The size of the fields is defined in your
location.fmt file and can easily be changed.
Also you might want to considder using a delimited format instead of
fixed length fields to accomodate your varchar columns better. This of
course assumes you can find a delimiter that doesn't occur as data in
your field. If nothing else can be found a tab-character might work.
:Is there another way/utility that can handle this?
:fyi:
: Informix 7.12
: HP-UX 10.01
:
:load command:
: dbload -d sysmaster -c location.fmt -l location.err -X -e 0 -P
:table contains:
: (location varchar(45),record_number integer,address varchar(45))
:thanx
:--
: Richard Cave
: Peregrine Systems, Inc.
: rcave@peregrine.com
Nils.Myklebust@idg.no
NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway
My opinions are those of my company