Page 1 of 1

DAT file

Posted: Wed Feb 16, 2011 7:16 am
by rsunny
Hi,

I am having a requirement where i need to read from DAT file and load into DB. As i never dealt with DAT file , can anyone please guide what is the stage that i need to use to read DAT file as can we use sequential file stage or do we need to use CFF stage only, and if we use Sequential file stage do we need to import the Cobol copy book or is it not necessary

Thanks in advance

Posted: Wed Feb 16, 2011 7:19 am
by chulett
Ask whomever you got this from what is in their ".dat" file. That extension is way too generic and could hold anything.

Posted: Wed Feb 16, 2011 7:45 am
by rsunny
Hi ,

Actually they are extracting the mainframe data into DAT file and FTPed the DAT file into Datastage Server.

Thanks in advance

Posted: Wed Feb 16, 2011 7:53 am
by chulett
Still too generic. Have they told you what exactly this "mainframe data" looks like? Given you a copybook / FD? If it is EBCDIC and/or has packed fields, then yes to using the CFF stage and having to import the FD.

Posted: Wed Feb 16, 2011 10:53 am
by rsunny
Hi,

Its in ASCII and and i am not sure if has packed fields or not and can you tell me how do we determine whethe it is paacked fields or they are going to tell about this and they had provided cobol copy book

Posted: Wed Feb 16, 2011 12:54 pm
by chulett
They can tell you.

Posted: Wed Feb 16, 2011 2:50 pm
by ray.wurlod
Ask about DIS file as well.
:lol:

Posted: Wed Feb 16, 2011 5:54 pm
by rsunny
Hi ray,

can you tell me what is DIS file means?

Thanks in advance

Posted: Wed Feb 16, 2011 6:24 pm
by ray.wurlod
DIS file and DAT file. Say it, rather than read it.

Neither is a particularly meaningful suffix.

Posted: Wed Feb 16, 2011 7:06 pm
by chulett
Humor fail. :(

Posted: Wed Feb 16, 2011 7:56 pm
by narasimha
This File and That File :lol:

Posted: Fri Feb 18, 2011 3:07 pm
by rsunny
Hi ,

I used a sequential stage and used the DAT file in sequential stage and when i view the data i could able to view the data. So i would like to know the DAT files can be used by both sequential or CFF stage

Thanks in advance

Posted: Fri Feb 18, 2011 3:38 pm
by DSguru2B
'DAT' is just an extension. You can take a text file and replace the '.txt' to '.dat'. It does not matter, a sequential file stage will be able to read it as long as you have the right metadata.
Now what matters is the content, if its not an ascii file or is an ascii file but was generated by mainframe (dataset) then you will need a cff stage to read it properly as the metadata may differ.

Posted: Fri Feb 18, 2011 5:10 pm
by jwiles
You do not absolutely need to use a cff stage whenever a file is created by a mainframe. Handling OCCURS DEPENDING ON clauses is handy with cff, as are a few other items. A typical sequential file with a fixed number of columns can usually be handled with only a Sequential File stage...did it plenty of times in 7x.

Regards,

Posted: Fri Feb 18, 2011 10:35 pm
by chulett
In other words, only you rsunny can determine if you'll be fine processing this particular "dat" file with the sequential file stage. You know what it looks like, how the fields are defined - we don't. If you're not positive you know exactly how each field is defined, get back together with whomever is supplying you this file, work out your doubts.

Once you have that information you can work out how to process the file.