Change DELIMITER in dbload command file
Posted in 1999
Topics: General Discussion
We use "^A" as our DBDELIMITER. Now I want to use 'dbload' command to
load my file in order to avoid the long transaction problem. I use the
following command file :
FILE aaa.unl DELIMITER "^A" 57 ;
INSERT INTO aaa ;!
But I always get the "Illegal Character" error message. For some
reasons, I cannot change the DBDELIMITER. How can I use
"^A" as the delimiter instead of the "|".
Thanks
Jung-Hui Cheng
cheng@dbtel.com.tw
jingker cheng wrote:
>
> We use "^A" as our DBDELIMITER. Now I want to use 'dbload' command to
> load my file in order to avoid the long transaction problem. I use the
> following command file :
>
> FILE aaa.unl DELIMITER "^A" 57 ;
> INSERT INTO aaa ;> !
>
> But I always get the "Illegal Character" error message. For some
> reasons, I cannot change the DBDELIMITER. How can I use
> "^A" as the delimiter instead of the "|".
You cannot. Dbload only supports delimiters in the range [!-~] and perhaps
<space> as well.
Art S. Kagel
I don't believe you can use ^A as a delimiter using dbload. If possible you
may want to preprocess your data before calling dbload. On UNIX use tr. You
have other options depending on your platform.
It appears that DB-Load won't allow you to use a control character.
I've not tested it formally in the last 3 weeks or so, but I'm pretty sure
that SQLCMD from the IIUG archives allows you to use control characters
OK.
Since your load command is equivalent to:
LOAD FROM "aaa.unl" DELIMITER "^A" INSERT INTO aaa;you should be able to use SQLCMD instead. If you had a fixed format file,
then you'd need to work a good deal harder. There's a program DBLDFMT
which does do fixed to delimited conversions, including adding explicit
decimal points where the data has only implicit decimal points. I'm not
sure if its in the
IIUG archive -- if it isn't, I'll send it...
jingker cheng wrote:
> We use "^A" as our DBDELIMITER. Now I want to use 'dbload' command to
> load my file in order to avoid the long transaction problem. I use the
> following command file :
>
> FILE aaa.unl DELIMITER "^A" 57 ;
> INSERT INTO aaa ;> !
>
> But I always get the "Illegal Character" error message. For some
> reasons, I cannot change the DBDELIMITER. How can I use
> "^A" as the delimiter instead of the "|".
>
> Thanks
>
> Jung-Hui Cheng
> cheng@dbtel.com.tw
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.62 -- see http://www.perl.com/CPAN
#include <disclaimer.h>
where do I find the IUUG-Archiv ?
Jonathan Leffler schrieb:
> It appears that DB-Load won't allow you to use a control character.
> I've not tested it formally in the last 3 weeks or so, but I'm pretty sure
> that SQLCMD from the IIUG archives allows you to use control characters
> OK.
> Since your load command is equivalent to:
> LOAD FROM "aaa.unl" DELIMITER "^A" INSERT INTO aaa;> you should be able to use SQLCMD instead. If you had a fixed format file,
>
> then you'd need to work a good deal harder. There's a program DBLDFMT
> which does do fixed to delimited conversions, including adding explicit
> decimal points where the data has only implicit decimal points. I'm not
> sure if its in the
> IIUG archive -- if it isn't, I'll send it...
>
> jingker cheng wrote:
>
> > We use "^A" as our DBDELIMITER. Now I want to use 'dbload' command to
> > load my file in order to avoid the long transaction problem. I use the
> > following command file :
> >
> > FILE aaa.unl DELIMITER "^A" 57 ;
> > INSERT INTO aaa ;> > !
> >
> > But I always get the "Illegal Character" error message. For some
> > reasons, I cannot change the DBDELIMITER. How can I use
> > "^A" as the delimiter instead of the "|".
> >
> > Thanks
> >
> > Jung-Hui Cheng
> > cheng@dbtel.com.tw
>
> --
> Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
> Guardian of DBD::Informix v0.62 -- see http://www.perl.com/CPAN
> #include <disclaimer.h>