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.
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;
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;
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
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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.