Error in dbimport - "^M" in files .unl
Posted in 2006
Topics: Storage & Space Management, Data Types & Schema Design, Migration, Import/Export & Data Conversion, Platform-Specific Issues
Hi all,
I have a problem, i did dbexport on informix 9.30 - Windows 2000, then pass by ftp to Informix 9.30 on Unix Solaris, here, when i try to import a database, get a following error during the dbimport :
{ TABLE "informix".perfil_de_usuario row size = 71 number of columns = 5 index size
= 73 }
{ unload file name = perfi00102.unl number of rows = 222657 }
create table "informix".perfil_de_usuario
(
cod_sistema varchar(2) not null ,
codigorol varchar(4) not null ,
cod_usuario varchar(20) not null ,
userid varchar(20),
funcid varchar(20),
primary key (cod_sistema,codigorol,cod_usuario)
) extent size 54 next size 16 lock mode page;
Load file has different number of columns than table
Then, when I see to file perfi00102.unl :
$ vi perfi00102.unl
S|01|SEG|020|0|||^M
S|03|SEG|021|0|||^M
S|03|SEG|029|0|||^M
S|03|SEG|028|0|||^M
S|03|SEG|027|0|||^M
S|02|SEG|014|0|||^M
How to avoid to obtain this "^M" in all files .unl, that's the problem..!
Of UNIX to UNIX there is no problem with dbimport.
How to solve this problem?
Thanks a lot.
Sorry by my english.
Omar.
Omar LUQUE Valdivia
Informix Database Administrator
Direcci'n de Telem'tica - Marina de Guerra del Per'
Av. La Marina Cdra. 36 s/n, La Perla - Callao, Lima - Peru
Telf : (511) 614-2900 (511) 562-3900 Ext. 2277 2265
E-mail : Luque001@marina.mil.pe
Cel. 9 639-7201
__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam 'gratis!
Reg'strate ya - http://correo.espanol.yahoo.com/
Omaluva wrote:
> Hi all,
>
> I have a problem, i did dbexport on informix 9.30 - Windows 2000,
> then pass by ftp to Informix 9.30 on Unix Solaris, here, when i try to
> import a database, get a following error during the dbimport :
>
> { TABLE "informix".perfil_de_usuario row size = 71 number of columns = 5
> index size
> = 73 }
> { unload file name = perfi00102.unl number of rows = 222657 }
> create table "informix".perfil_de_usuario
> (
> cod_sistema varchar(2) not null ,
> codigorol varchar(4) not null ,
> cod_usuario varchar(20) not null ,
> userid varchar(20),
> funcid varchar(20),
> primary key (cod_sistema,codigorol,cod_usuario)
> ) extent size 54 next size 16 lock mode page;
> Load file has different number of columns than table
>
> Then, when I see to file perfi00102.unl :
> $ vi perfi00102.unl
> S|01|SEG|020|0|||*^M
> *S|03|SEG|021|0|||*^M
> *S|03|SEG|029|0|||*^M
> *S|03|SEG|028|0|||*^M
> *S|03|SEG|027|0|||*^M
> *S|02|SEG|014|0|||*^M*>
> How to avoid to obtain this "*^M*" in all files .unl, that's the problem..!
> Of UNIX to UNIX there is no problem with dbimport.
FTP the files in TEXT mode, your FTP utility is defaulting to binary mode.
> How to solve this problem?
Here's a simple 'C' prog to remove the carriage returns:
/* nocr.c - strip carriage return characters from an input file.
#include <stdio.h>
#include <stdlib.h>
char RCSHeader[] = "$Header: nocr.c,v 1.1 98/07/23 14:25:53 kagel Exp $",
ECSId[] = "$Id: nonl.c,v 1.2 1993/07/14 19:41:37 kagel Exp $";
int main()
{
int ch;
while( (ch = fgetc( stdin )) != EOF)
if (ch != '\\r')
fputc( ch, stdout );
}
/* End of C file nocr.c */
This is a simple UNIX filter.
Art S. Kagel
> Thanks a lot.
>
> Sorry by my english.
>
> Omar.