DATA Step, Macro, Functions and more

Convet XPT to SAS dataset

Reply
Contributor
Posts: 36

Convet XPT to SAS dataset

Wondering that I am unable to covert XPT to SAS datasets using either copy or cimport procedure.

 

Log says file not found.

 

what could be the issue here. Is there any other way to do ?

 

libname abc xport 'CSmiley Frustratedource\abc.xpt' access=readonly;
proc copy inlib=abc
outlib=work;run;


proc cimport data = data_out infile='CSmiley Frustratedource\abc.xpt';
run;
quit;

Super User
Super User
Posts: 7,988

Re: Convet XPT to SAS dataset

There really isn't enough information to debug here.  If the log states file not found, then its likely the file isn't found.  Can you get to the file via the Explorer window in SAS (actually what SAS are you using, UE for instance is all on its own image).  Syntax seems fine.  Also, post the whole log snippet (as text in the post).

Super User
Posts: 7,854

Re: Convet XPT to SAS dataset

[ Edited ]

For posting SAS code, use the "little running man" icon. It preserves code formatting and suppresses interpretation of "smileys".

For the log, use the {i} icon. Also important so the horizontal positioning of messages is preserved.

 

The log of the whole code snippet will really help in interpreting what's going wrong.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 11,343

Re: Convet XPT to SAS dataset


vandhan wrote:

Wondering that I am unable to covert XPT to SAS datasets using either copy or cimport procedure.

 

Log says file not found.

 

what could be the issue here. Is there any other way to do ?

 

libname abc xport 'C:\Source\abc.xpt' access=readonly;
proc copy inlib=abc
outlib=work;run;


proc cimport data = data_out infile='C:\Source\abc.xpt';
run;
quit;


 

Ask a Question
Discussion stats
  • 3 replies
  • 103 views
  • 0 likes
  • 4 in conversation