Hi,
I am trying to open an .xpt file in SAS Studio, without much luck,
Here is the code, which I copied from an earlier SAS community string:
libname target "&tabin.";
filename importin "&tabin./substatxpt.xpt";
proc cimport infile=importin library=target;
run;
I receive the following error message:
NOTE 18-208: Libref TARGET was successfully assigned as follows:
Thank you.
The .xpt file is 22kb
Here is the text I get when opening in notepad, I guess it speaks for itself ! , and file is corrupt ....
⨪佃偍䕒卓䑅⨪⨠䌪䵏剐卅䕓⩄⨪佃偍䕒卓䑅⨪⨠䌪䵏剐卅䕓⩄⨪佃偍䕒卓䑅⨪⨪⨪⨪䥌⁂佃呎佒⁌㍗弲倷佒ڼ匠十⸹밴䦃ꖼ㥄問뱔厃䉕呓呁鞼䍖㈱膼䍒㜱백劇ㅌ㈵螼백厇〠†‰〠†低蒼배ㆉ閼汷ㅴ誼캼캼偓乁䌠乏剔䱏ⴠ밷㒂배ㆅ蚼〴誼뱌㒈배벎밦厦䅐⁎佃呎佒⁌
Also I did try the xport engine, and that did not work too.
Thank you !
What is the file size as reported by the operating system for that file?
Can you open the xpt file in a text editor? If so you would see some text similar to this on the first row if it was created by Proc Cport likey following COMPRESSED*****
LIB CONTROL W32_VSPR¼SAS SAS9.2¼«D901SASHELP CLASS
so you could find the SAS version and the original name of the data set.
If it doesn't look like this then you are likely to have a corrupted file.
Another option may be to look at the xport engine:
filename importin xport "&tabin./substatxpt.xpt"; proc copy in=importin library=target; run;
Thank you.
The .xpt file is 22kb
Here is the text I get when opening in notepad, I guess it speaks for itself ! , and file is corrupt ....
⨪佃偍䕒卓䑅⨪⨠䌪䵏剐卅䕓⩄⨪佃偍䕒卓䑅⨪⨠䌪䵏剐卅䕓⩄⨪佃偍䕒卓䑅⨪⨪⨪⨪䥌⁂佃呎佒⁌㍗弲倷佒ڼ匠十⸹밴䦃ꖼ㥄問뱔厃䉕呓呁鞼䍖㈱膼䍒㜱백劇ㅌ㈵螼백厇〠†‰〠†低蒼배ㆉ閼汷ㅴ誼캼캼偓乁䌠乏剔䱏ⴠ밷㒂배ㆅ蚼〴誼뱌㒈배벎밦厦䅐⁎佃呎佒⁌
Also I did try the xport engine, and that did not work too.
Thank you !
So I just replaced the SAS studio file a newly downloaded "original", and the code works...
Thanks !
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.