Solved

reading .dat files

Posted on 2003-11-13
5
1,579 Views
Last Modified: 2010-04-26
I am working on an sco unix machine and tried to open a file called cust.dat.  I thought it was a text file but it is binary.  

My goal is to create a text file export for transfer to a windows xp machine to be imported into a foxpro or access table.

How can I tell what type of database manager this file was built on?  And, HOW can I export the data from it to text file?
0
Comment
Question by:jimoswald
5 Comments
 
LVL 1

Accepted Solution

by:
JosipKulundzic earned 34 total points
ID: 9745474
Hey there jimoswald

Try to ftp the file (in ascii mode) to the windows XP machine and view it in wordpad (or notepad if you dont have wordpad installed).  You might find that the file is coherent and the format can be supprted by excel.  Depending on the format of the file, try opening the file withing excel as a "fixed width" or "delimited" file (if columns are delimited by special characters) and see if you can make any sense of it.  If necessary clean up the data and then save it as an excel file (.xls or .csv) and then try importing that file into access (or foxpro...).

Hope this helps :D
Jos
0
 
LVL 18

Assisted Solution

by:chicagoan
chicagoan earned 33 total points
ID: 9745561
You'll have to examine the application (and it's documentation) that created the file and see if there are any export options or file conversion utilites unless it's in an ascii delimited format or a common database binary.
0
 
LVL 3

Assisted Solution

by:guynumber5764
guynumber5764 earned 33 total points
ID: 9752324
Assuming there is no easy way to export the file from its application...
You can use "od" (might be called "hd" under sconix) to dump the contents.  If it is a database file, it'll almost certainly have a record length that can be determined by looking for repeating fields (postal code for ex).  From there, you can take a number of approaches depending on what you want to accomplish and how much work you want to put in.  Usually I would just define a C struct to match the record format and write a little proggy to dump the file in plaintext.


0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I recently purchased an HP EliteBook 2540p notebook/laptop. It has two video ports on it – VGA and DisplayPort. HP offers an optional docking station for the 2540p that also has both a VGA port and a DisplayPort. There are numerous online reports do…
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now