Page 1 of 1

ASCIIOutput a tab delimited file

Posted: Tue Apr 19, 2011 6:12 pm
by Fionnuala
Hello,
I'm using ASCIIOutput to create a file but need it to be a tab delimited type.
Does anyone know if it's possible to specifiy this in TI?
Thanks for your help,
Fionnuala

Re: ASCIIOutput a tab delimited file

Posted: Tue Apr 19, 2011 6:18 pm
by jim wood
It is comma delimited only as far as I am aware. You could write a btach file that opens the file and replaces commas with tabs. You could run the batch within TI after the ASCIIOuput has finished,

Jim.

Re: ASCIIOutput a tab delimited file

Posted: Tue Apr 19, 2011 6:24 pm
by Fionnuala
Thanks Jim, I'll try that.
It certainly seems like there's no option in TI so a batch file might do the trick.
Thanks,
Fionnuala
BTW I'm using 9.4FP3

Re: ASCIIOutput a tab delimited file

Posted: Tue Apr 19, 2011 6:25 pm
by Michel Zijlema
Hi,

You can use the DatasourceASCIIDelimiter TI variable to specify the field separator.
F.i.: DatasourceASCIIDelimiter=Char(code);
where code is the ascii code for tab.

Michel

Re: ASCIIOutput a tab delimited file

Posted: Tue Apr 19, 2011 7:03 pm
by Fionnuala
Thanks very much Michel, that seems to have worked with the code 9 for tab..
I just need to get rid of the "" around each field now,
Regards,
Fionnuala

Re: ASCIIOutput a tab delimited file

Posted: Tue Apr 19, 2011 7:06 pm
by Fionnuala
ok I have it with
DatasourceASCIIDelimiter=Char(9);
DatasourceASCIIQuoteCharacter='';

Thanks for your help,
Fionnuala

Re: ASCIIOutput a tab delimited file

Posted: Tue Apr 19, 2011 7:07 pm
by Michel Zijlema
Fionnuala wrote:Thanks very much Michel, that seems to have worked with the code 9 for tab..
I just need to get rid of the "" around each field now
You can use the DatasourceASCIIQuoteCharacter variable for that:
DatasourceASCIIQuoteCharacter='';

Michel

Edit - Ok, you already found that ;)