DATA Step, Macro, Functions and more

Convert SAS V8 Transport File Format to SAS data set?

Reply
Super Contributor
Posts: 297

Convert SAS V8 Transport File Format to SAS data set?

Hi, all:

 

Does anyone know how to convert SAS V8 Transport File Format to SAS data set?  Many thanks.

 

Y

 

I created a code below:

 

libname source 'C:\My SAS Files\IIT';

libname xportout xport 'C:\My SAS Files\IIT\Data_CID_new version_hard drive.xpt';

data xportout.grades;

set source.grades;

run;

 

One Error message is shown that:

ERROR: File SOURCE.GRADES.DATA does not exist.

 

How is that come???

Super User
Posts: 10,500

Re: Convert SAS V8 Transport File Format to SAS data set?

Check your log to make sure the library was actually created.

Then check the spelling of your dataset name to ensure it is in the library.

 

I don't see where you are trying to convert a transport file though. The way you are using or xport library is for output not input.

typically I would expect to see Proc Cimport to read a transport file:

 

proc cimport library=mylib infile="path\file.xpt"; run;

Trusted Advisor
Posts: 1,115

Re: Convert SAS V8 Transport File Format to SAS data set?

I agree with @ballardw that PROC CIMPORT is the right tool if the .xpt file was created using PROC CPORT. However, if it was created using the XPORT engine (in which case I think it would actually be a SAS V5 transport file), I would use:

proc copy in=xportout out=work; /* or choose another output library */
run;
Ask a Question
Discussion stats
  • 2 replies
  • 327 views
  • 2 likes
  • 3 in conversation