Search Box

Google

Saturday, December 09, 2006

Error in dbimport - "^M" in files .unl
All 6 messages in topic - view as tree
From: Omaluva - view profile
Date: Tues, Dec 5 2006 4:59 pm
Email: Omaluva


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 : Luque...@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/


Reply » Rate this post: Text for clearing space


From: Obnoxio The Clown - view profile
Date: Tues, Dec 5 2006 5:16 pm
Email: "Obnoxio The Clown"


Omaluva said:



> 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 :
> How to avoid to obtain this "^M" in all files .unl, that's the
> problem..!



You are using binary mode to move the files with FTP. Use ASCII mode,
instead.

--
Bye now,
Obnoxio


"I don't read newspapers anymore except the local rag which I do weekly to
cheer myself trying to see if anyone I hate has been stabbed."
-- Horribilis XVI


--
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.


Reply » Rate this post: Text for clearing space


From: Mike Badar - view profile
Date: Tues, Dec 5 2006 5:20 pm
Email: "Mike Badar"


Omar,


> -----Original Message-----
> From: informix-list-boun...@iiug.org
> [mailto:informix-list-boun...@iiug.org] On Behalf Of Omaluva
> Sent: Tuesday, December 05, 2006 7:59 AM
> To: informix-l...@iiug.org
> Cc: iiug-...@iiug.org
> Subject: Error in dbimport - "^M" in files .unl

> 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,



Did you specify ASCII as the transfer protocol?

DOS> ftp solaris
username
password
FTP> ascii
FTP> put




- Hide quoted text -
- Show quoted text -

> 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 : Luque...@marina.mil.pe
> Cel. 9 639-7201



Give this a try and let us know.

Mike Badar
ESRI Professional Services
1 International Ct.
Broomfield, CO 80021
mba...@esri.com
303-449-7779
www.esri.com



- Hide quoted text -
- Show quoted text -

> __________________________________________________
> Correo Yahoo!
> Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
> Regístrate ya - http://correo.espanol.yahoo.com/



Reply » Rate this post: Text for clearing space


From: Carlos Alberto Correa Fayad - view profile
Date: Tues, Dec 5 2006 5:44 pm
Email: "Carlos Alberto Correa Fayad"


Omar que tal

Verifique si en el Solaris hay un comando dos2unix, este, convierte el formato dos a unix.


Otra opcion,


Con sed hagalo asi:


Creen un script con estas lineas


sed s/\^M\$// $1>temp$$
mv temp$$ $1
sed /\^\$/d $1>temp$$
mv temp$$ $1


Luego ejecute : nombre_script Nombre_archivo_dos


Un saludo




- Hide quoted text -
- Show quoted text -

> ----- Original Message -----
> From: Omaluva
> To: informix-l...@iiug.org
> Subject: Error in dbimport - "^M" in files .unl
> Date: Tue, 5 Dec 2006 08:59:00 -0600 (CST)

> 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 : Luque...@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/


> _______________________________________________
> Informix-list mailing list
> Informix-l...@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list



--
_______________________________________________
Get your free email from http://www.linuxmail.org

Powered by Outblaze


Reply » Rate this post: Text for clearing space


From: Susanne Hüsing - view profile
Date: Tues, Dec 5 2006 5:47 pm
Email: Susanne Hüsing

Hi,

use dos2unix-conmmand to convert from DOS format to ISO format


dos2unix [ -ascii ] [ -iso ] [ -7 ] originalfile converted file


look at the man-pages on the unix-box


s. huesing


Mike Badar schrieb:



- Hide quoted text -
- Show quoted text -

> Omar,

>> -----Original Message-----
>> From: informix-list-boun...@iiug.org
>> [mailto:informix-list-boun...@iiug.org] On Behalf Of Omaluva
>> Sent: Tuesday, December 05, 2006 7:59 AM
>> To: informix-l...@iiug.org
>> Cc: iiug-...@iiug.org
>> Subject: Error in dbimport - "^M" in files .unl


>> 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,


> Did you specify ASCII as the transfer protocol?


> DOS> ftp solaris
> username
> password
> FTP> ascii
> FTP> put


>> 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 : Luque...@marina.mil.pe
>> Cel. 9 639-7201


> Give this a try and let us know.


> Mike Badar
> ESRI Professional Services
> 1 International Ct.
> Broomfield, CO 80021
> mba...@esri.com
> 303-449-7779
> www.esri.com


>> __________________________________________________
>> Correo Yahoo!
>> Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
>> Regístrate ya - http://correo.espanol.yahoo.com/



Reply » Rate this post: Text for clearing space


From: Art S. Kagel - view profile
Date: Tues, Dec 5 2006 6:30 pm
Email: "Art S. Kagel"




- Hide quoted text -
- Show quoted text -

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
#include


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



- Hide quoted text -
- Show quoted text -

> Thanks a lot.

> Sorry by my english.


> Omar.



Reply » Rate this post: Text for clearing space


End of messages

No comments: