dbload command do not support ^B as delimiter
Posted in 2016
Topics: Server Administration, Versions, Editions & End-of-Life
Informix 12.10FC6
Platform : Linuxs
I wanted to load files (couple of millions to hundred of millions rows each
file) into informix raw table and wanted to write those problematic record(s)
into error file(s) and proceed with those that are good.
So, logical choice is dbload command.
Problem is I am not able to used CONTROL-B character as the delimiter.
Reason why I used CONTROL-B is at time I need to load double byte character
into the table and CONTROL-B seem to be one of the most unique character.
Question(s)
1) Is that a way for dbload to recognized the CONTROL-B as the delimiter?
I had tried this using load command and it is working.
2) I can create an external table to associate that with the data file(with
CONTROL-B as DELIMITER) and later used the insert into TARGET_TABLE select *
from EXTERNAL_TABLE.
Problem with this approach is user may not have resource/dba privilege on the
DB. Is that any better way ?
Content of the control file:
FILE test1.unl DELIMITER "^B" 5 ;
INSERT INTO test1 ;
Table schema
create table "informix".test1
(
col1 serial not null ,
col2 char(20),
col3 integer,
col4 decimal(12,2),
col5 float,
primary key (col1)
);
Error :
Inst_1: dbload -d stores -c test1.ctl -l test1.LOG -X -s
DBLOAD Load Utility INFORMIX-SQL Version 12.10.FC6AEE
FILE test1.unl DELIMITER " " 5 ;
Syntax error occurs on statement above.
Line 1 Character 26
A valid FILE statement must be the first statement in the command file.
Create the table with reference to a symbolic link that the user can
recreate to point to the correct files?
On Thu, Feb 4, 2016 at 4:08 AM, LEY PATRICK <patrickley@gmail.com> wrote:
> Informix 12.10FC6
> Platform : Linuxs
>
> I wanted to load files (couple of millions to hundred of millions rows each
> file) into informix raw table and wanted to write those problematic
> record(s)
> into error file(s) and proceed with those that are good.
>
> So, logical choice is dbload command.
>
> Problem is I am not able to used CONTROL-B character as the delimiter.
> Reason why I used CONTROL-B is at time I need to load double byte character
> into the table and CONTROL-B seem to be one of the most unique character.
>
> Question(s)
> 1) Is that a way for dbload to recognized the CONTROL-B as the delimiter?
>
> I had tried this using load command and it is working.
> 2) I can create an external table to associate that with the data file(with
> CONTROL-B as DELIMITER) and later used the insert into TARGET_TABLE select
> *
> from EXTERNAL_TABLE.
>
> Problem with this approach is user may not have resource/dba privilege on
> the
> DB. Is that any better way ?
>
> Content of the control file:
> FILE test1.unl DELIMITER "^B" 5 ;
> INSERT INTO test1 ;>
> Table schema
> create table "informix".test1
> (
>
> col1 serial not null ,
>
> col2 char(20),
>
> col3 integer,
>
> col4 decimal(12,2),
>
> col5 float,
>
> primary key (col1)
> );
>
> Error :
> Inst_1: dbload -d stores -c test1.ctl -l test1.LOG -X -s
>
> DBLOAD Load Utility INFORMIX-SQL Version 12.10.FC6AEE
>
> FILE test1.unl DELIMITER " " 5 ;
> Syntax error occurs on statement above.
> Line 1 Character 26
>
> A valid FILE statement must be the first statement in the command file.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
--047d7bdc14e6e46d27052af03cb0