Programming the statistical procedures from SAS

Problems in importing XPT datafile

Accepted Solution Solved
Reply
Contributor ZC
Contributor
Posts: 21
Accepted Solution

Problems in importing XPT datafile

Hi,

I have run the following syntax to import XPT datafile:

libname d "D:\DXA\data";                              

libname dexa9900 xport "D:\DEXA\data\dxx9900.xpt";


proc copy in=dexa9900 out=d memtype=data;
run;

But below the errors have been showed in the LOG window. The dxx9900.xpt does physically exist in the pathway as in the syntax. The result, of course, is that the data can not be imported. why? Thanks,

NOTE: Input library DEXA9900 is sequential.
ERROR: Physical file does not exist, D:\DEXA\data\dxx9900.xpt.
NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE COPY used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

NOTE: The SAS System stopped processing this step because of errors.


Accepted Solutions
Solution
‎06-18-2012 11:43 AM
Super User
Super User
Posts: 6,139

Re: Problems in importing XPT datafile

The error message is that SAS cannot see the file. If the file existed and was not in the V5 transport file format then you would have received a different error message.

Check the filename again. For example your other path is DXA instead of DEXA.

You can even use a SAS function FILEEXIST to check that the file actually is there.

Perhaps SAS is running on a different machine or under a different user than what you are using to check that the filename is correct?

View solution in original post


All Replies
Grand Advisor
Posts: 10,048

Re: Problems in importing XPT datafile

Is this file a SAS Transport file? If so you probably need PROC CIMPORT.

Some thing like

filename dexa9900 "D:\DEXA\data\dxx9900.xpt";

proc cimport infile=dexa9900 library=d;run;

Solution
‎06-18-2012 11:43 AM
Super User
Super User
Posts: 6,139

Re: Problems in importing XPT datafile

The error message is that SAS cannot see the file. If the file existed and was not in the V5 transport file format then you would have received a different error message.

Check the filename again. For example your other path is DXA instead of DEXA.

You can even use a SAS function FILEEXIST to check that the file actually is there.

Perhaps SAS is running on a different machine or under a different user than what you are using to check that the filename is correct?

☑ This topic is SOLVED.

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

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