Write and run SAS programs in your web browser

open xpt file in SAS studio

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 15
Accepted Solution

open xpt file in SAS studio

[ Edited ]

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:

Engine: V9
Physical Name: /home/director1/ABC/Data_170328\
63 filename importin "/home/director1/ABC/Data_170328/substatxpt.xpt" ;
64 proc cimport infile=importin library=target;
65 run;
 
NOTE 17-319: PROC CIMPORT begins to create/update data set TARGET.SUBSTAT
ERROR 9-7: File TARGET.SUBSTAT.DATA does not exist.
ERROR 96-319: Data set TARGET.SUBSTAT was not created/replaced due to errors.
NOTE: PROCEDURE CIMPORT used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 187.31k
OS Memory 59208.00k
Timestamp 04/05/2017 09:53:35 PM
Step Count 13775 Switch Count 28
Page Faults 0
Page Reclaims 9
Page Swaps 0
Voluntary Context Switches 63
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 0
 
My only thought is that the SAS XPT file does not contain data, or something along those lines.
Appreciate any insight you can provide, thanks,
R

 


Accepted Solutions
Solution
‎04-05-2017 07:41 PM
Occasional Contributor
Posts: 15

Re: open xpt file in SAS studio

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 !

View solution in original post


All Replies
Super User
Posts: 11,121

Re: open xpt file in SAS studio

[ Edited ]

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;
Solution
‎04-05-2017 07:41 PM
Occasional Contributor
Posts: 15

Re: open xpt file in SAS studio

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 !

Occasional Contributor
Posts: 15

Re: open xpt file in SAS studio

So I just replaced the SAS studio file a newly downloaded  "original", and the code works...

Thanks ! 

☑ This topic is solved.

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

Discussion stats
  • 3 replies
  • 227 views
  • 0 likes
  • 2 in conversation