Flat file with delimiters in FastExport

Tools

Flat file with delimiters in FastExport

Hi,

I need to create a delimited file using fastexport. As fast export do not support delimited format, so I have written the select to get the delimited output. But the following script prefix each line with 2 junk characters.

[Script]
.LOGTABLE tempdb.xxlogtable;
.LOGON TD_DB/USER1,PASS1;

.BEGIN EXPORT SESSIONS 7
DATAENCRYPTION OFF;

.EXPORT OUTFILE SALIDA.txt
MODE RECORD
FORMAT TEXT;

select
trim(col1) || '|' ||
trim(col2) || '|' ||
trim(col3) || '|' || ...........
...............................
trim(col50)
from table

.END EXPORT;
.LOGOFF;

[Output]
#.R1Field1|R1Field2|...
_:R2Field1|R2Field2|...
...........................

[Desidered Output]
R1Field1|R1Field2|...
R2Field1|R2Field2|...
...........................

I cannot cast the output as char(xxx) as it will increase the size of the output file.
I'm running Fastexport V.07.08.00.000 Win32 plataform.

Any kind of suggestions is highly appreciated.

Thanks,
Jorge
3 REPLIES

Re: Flat file with delimiters in FastExport

GIVE each column datatype and length ok

Re: Flat file with delimiters in FastExport

Hello Jorge,

As Fastexport delimited format will add 2 binary character for the length of the record. however if any one can give idea how to ignore 2 binary character in mload.

Thanks in advance!!

Rajendran

Re: Flat file with delimiters in FastExport

if your purpose is to fastexport from one table and mload else where, why don't you make use of the mlscript option of fastexport ?