Solved

reading .dat files

Posted on 2003-11-13
5
1,581 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
RAID 1 - Problem with Data 8 80
Windows 7 Temporary Profile 4 84
WORM compliant device  what is it? 12 73
Repairing a physically broken flash drive 4 31
this article is a guided solution for most of the common server issues in server hardware tasks we are facing in our routine job works. the topics in the following article covered are, 1) dell hardware raidlevel (Perc) 2) adding HDD 3) how t…
In this article you will get to know about pros and cons of storage drives HDD, SSD and SSHD.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

786 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