Page 1 of 1

Output file's format binary or ascii

Posted: Wed May 07, 2008 1:03 am
by agathaeleanor
Dear All Expert,
I would want to seek for your advise that, i've a dsjob that will query a table in db then output the result in a flat file. May i know how do i change the flat file type to either ascii or binary?

As the output result containing some weird character when i opened the flat file. Fyi, the output result will then going through a transformer and insert into a table in db. Cos of the weird char, it makes DATENUM column with date follow by some space. Any solution to this? Thanks in advance.

Posted: Wed May 07, 2008 4:20 am
by ray.wurlod
ASCII. To get a binary file you need to do explicit transformation.

You need to do some detective work to find out exactly what your "weird character" is, then maybe we can help you with that.

Posted: Wed May 07, 2008 7:11 pm
by agathaeleanor
by default it will generate ASCII file. But then the output file will then transform, is there any possibility that the output file change to binary file after going through transformer?
Weird char as in a square box appeared. When it inserts into table, it appears as space.

Posted: Wed May 07, 2008 7:24 pm
by ray.wurlod
No "magic" transformations occur - only the one(s) you specify. Use a hex editor of some kind to find out what this character is.

One possibility is that you have specified UNIX-style line termination, where the file is acutally using DOS-style.

Posted: Wed May 07, 2008 7:57 pm
by agathaeleanor
No...I mean the output file will then going through a transformer for my current dsjob. Will it be the root cause that, the transformation of file changing the default file format?

Btw, I cant see rest of the line....:(

Posted: Thu May 08, 2008 6:29 am
by PhilHibbs
A Transformer will not change file formats - file formats are determined by the Sequential File stage. Once data is in DataStage, flowing from stage to stage via links, it is no longer associated with a file. It's data flowing around in memory on your server. When it flows down a link that ends up in a Sequential File stage, then at that point the data is written out to the file in whatever format the file stage specifies.