how to read .dat file(binary data) through datastage PX

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
chpraveen.msc
Participant
Posts: 26
Joined: Tue Nov 08, 2005 5:36 am

how to read .dat file(binary data) through datastage PX

Post by chpraveen.msc »

Hi all,
i want to read a .dat file(binary file) through datastage. Is that possible, if so please let me know the procedure.

Thanks in advance.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You still need to understand its structure. If you have that, then you can create a record schema and would be able to read it.

You can also read it as a single column of type raw, but there's not a whole lot you can do 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.
chpraveen.msc
Participant
Posts: 26
Joined: Tue Nov 08, 2005 5:36 am

Post by chpraveen.msc »

Hi Ray,
Thanks for the reply.
I have the .dat file(binary data) but i am unable to view the data and its format. client just gave us the template of the data. I tried to view that file using complex flat file stage considering the whole set as single column but i am unble make any progress. can you please elaborate you lines "can create a recod schema and would be able to read it'.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If your client supplied you with a template you should know the layout. The CFF stage will only help you in this case if the data came from something like a COBOL program, which generally doesn't issue binary data except for certain computational fields.

What sort of binary data does the file contain? What does your template description show?

Without understanding the internal file structure you will be unable to do anything, including creating a record schema.
csrazdan
Participant
Posts: 127
Joined: Wed May 12, 2004 6:03 pm
Location: Chicago IL

Re: how to read .dat file(binary data) through datastage PX

Post by csrazdan »

You need to have COBOL copy book along with dat file. Save copy book in a text file and use DataStage Manager to generate metadata. In the DataStage Designer create a job with CFF and import metadata and include .dat file name. Click view date, you should be able to read binary data file.
Assume everything I say or do is positive
Post Reply