I have to import a file from stata in v8xpt format.
My SAS version is the 9.4.
Which procedure should I to follow?
Running the macro %xpt2loc it returns the error:
So you asked STATA to write data in SAS's transport format?
Note that SAS transport files are binary files, even though the top of the file looks like text, so make sure to move them as binary when transferring using tools like FTP.
You can look at the beginning of the file to see if it really looks like a SAS transport file. An easy way is with a simple data step.
What do you get if you run something like this?
data _null_;
infile 'mydata.xpt' lrecl=80 recfm=f obs=3 ;
input;
list;
run;
the file used as test has the extension .V8xpt and the system is not recognizing it.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.