Output file's format binary or ascii

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
agathaeleanor
Participant
Posts: 76
Joined: Mon Mar 05, 2007 9:26 pm
Location: Malaysia

Output file's format binary or ascii

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
agathaeleanor
Participant
Posts: 76
Joined: Mon Mar 05, 2007 9:26 pm
Location: Malaysia

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
agathaeleanor
Participant
Posts: 76
Joined: Mon Mar 05, 2007 9:26 pm
Location: Malaysia

Post 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....:(
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Post 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.
Phil Hibbs | Capgemini
Technical Consultant
Post Reply