how to read a .dat file (data file) which i couldnt read as a text file???using
ODBC is mostly used for reading database tables not data/text files. What does the .DAT file look like when viewed in a text editor? Does it have aligned rows and columns or is a delimiter used to separate columns?
What issues are you having reading it?
It is not opening in text editor, when tried data is crashed.
I basically want to read a .dat file that is copied from exchequer database.
Thank you
How big is the file? Most likely it is the file size that is causing the text editor problems.
You could try reading a few records in SAS to see what the record layout is by writing the first 5 records to the SAS log:
data test;
infile "YourFileName.dat" obs = 5;
input;
put _infile_;
run;
Files are quite small something around 100 KB.
These files are extracted from Pervasive DB which has a default extension .Dat. which cannot be opened in text editor.
The only way I can read this file is through ODBC connection.
So you can already open the data in, say, Excel via the ODBC connection?
Thank you all . We need to buy Btrieve odbc drivers, it solves the problem.
Is it copied or exported from the database?
Is there any documentation about the structure?
If not, return to sender.
If I recall it correctly, I think.dat was the default extension for export/backup-files in (very) old versions of SQL Server.
If this is such file, you can't import it either way (ODBC nor text file import).
Verify your source, before trying to import it.
Yes it is default extension and these files are extracted from pervasive db.
Don't think this is a SAS question. How you can be able to access this data via ODBC is a question for Actian/Pervasive DB.
Once you secured ODBC access to your source data, then you can go to SAS and try to connect.
You will also need the SAS product SAS/ACCESS to ODBC both installed and licensed if you wish to extract ODBC data using SAS code.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.