SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
trueblood
Calcite | Level 5

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. 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

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

3 REPLIES 3
ballardw
Super User

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;

 

 

trueblood
Calcite | Level 5

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 

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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