DATA Step, Macro, Functions and more

.bin to sas

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

.bin to sas

I was given a .bin file that a collaborator says is a binary file of a sas tranport file; however, I cannot seem to get the file to open in SAS. I am wondering what the easiest way is for opening this file. 


Accepted Solutions
Solution
‎01-19-2017 10:40 AM
Super User
Posts: 11,343

Re: .bin to sas

Posted in reply to trueblood

If the file is a transport file then you likely need to read it with Proc Cimport. Is that what you used to "open" it?

 

Since a transport file may have many data sets SAS does not just read one by clicking on it.

You need to set up a library to receive the data.

 

Libname newlib "path for your library";

proc cimport library=newlib infile="full path and filename of transport file";

run;

 

 

View solution in original post


All Replies
Solution
‎01-19-2017 10:40 AM
Super User
Posts: 11,343

Re: .bin to sas

Posted in reply to trueblood

If the file is a transport file then you likely need to read it with Proc Cimport. Is that what you used to "open" it?

 

Since a transport file may have many data sets SAS does not just read one by clicking on it.

You need to set up a library to receive the data.

 

Libname newlib "path for your library";

proc cimport library=newlib infile="full path and filename of transport file";

run;

 

 

New Contributor
Posts: 2

Re: .bin to sas

Thank you for your help. I was able to get the data this morning (32 data files and 8 sas catalogs). It was a transport file converted to a binary file based on the limited background I was provided. 

 

However, the real misunderstanding was that I believed it was one large data file. 

 

Thank you, 

Amber 

Super User
Super User
Posts: 7,942

Re: .bin to sas

Posted in reply to trueblood

Well, my first question would be, to the collaborator, why the file extension is .bin - i.e. its a binary file, and not .xpt - SAS transport file?  I mean if the person can't even follow basic standards then I would just remove the file from your system.  It could be anything your trying to read in, a picture, an old Office file, could just be a stream of random 1/0's.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 184 views
  • 1 like
  • 3 in conversation