BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
rk7
Obsidian | Level 7 rk7
Obsidian | Level 7

Hi

I tried to open a .dat file in order to see the contents/data in the file. I stored the file in a shared location and try to open it in the browser. It din't open , moreover it was downloaded. can u pls help me in opening the opening the file to see what data we have in that file.

Thank you

 

P.S. attached the .dat file

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisBrooks
Ammonite | Level 13

The reason the file was downloaded and not opened is that a .DAT file isn't a SAS file. In fact .DAT is an extension used for many different types of files which can sometimes only be opened by the application that created them. You might, however, be in luck if the .DAT files you want to read are text based delimited files like CSVs. Try opening them in a text editor to check out the format and if it's a plain text delimited file try Proc Import.

View solution in original post

6 REPLIES 6
ChrisBrooks
Ammonite | Level 13

The reason the file was downloaded and not opened is that a .DAT file isn't a SAS file. In fact .DAT is an extension used for many different types of files which can sometimes only be opened by the application that created them. You might, however, be in luck if the .DAT files you want to read are text based delimited files like CSVs. Try opening them in a text editor to check out the format and if it's a plain text delimited file try Proc Import.

rk7
Obsidian | Level 7 rk7
Obsidian | Level 7

Thanks can u explain more about proc import

ChrisBrooks
Ammonite | Level 13

Proc Import is a SAS supplied routine you can use to convert many different file types into SAS Data Sets - you can find the documentation here -> http://documentation.sas.com/?docsetId=acpcref&docsetTarget=p0mqdq52ktqgjjn1vseqoiuyt3v1.htm&docsetV... and numerous online examples via a Google Search.

rk7
Obsidian | Level 7 rk7
Obsidian | Level 7
Thank you
Kurt_Bremser
Super User

Anytime you encounter a SAS problem, do a (google) search for "sas text_of_your_problem". This works well with statements, functions, formats, procedures, but also ERROR or WARNING messages.

See Maxim 6.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 3970 views
  • 1 like
  • 3 in conversation