[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

reading .dat files

Posted on 2003-11-13
5
Medium Priority
?
1,588 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
3 Comments
 
LVL 1

Accepted Solution

by:
JosipKulundzic earned 136 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 132 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 132 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

830 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