Solved

reading .dat files

Posted on 2003-11-13
5
1,585 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Monitor input from a computer is usually nothing special.  In this instance it prevented anyone from using the computer.  This was a preconfiguration that didn't work.
This paper addresses the security of Sennheiser DECT Contact Center and Office (CC&O) headsets. It describes the DECT security chain comprised of “Pairing”, “Per Call Authentication” and “Encryption”, which are all part of the standard DECT protocol.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

717 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