BookmarkSubscribeRSS Feed
ybz12003
Rhodochrosite | Level 12

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???

2 REPLIES 2
ballardw
Super User

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;

FreelanceReinh
Jade | Level 19

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;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 3084 views
  • 2 likes
  • 3 in conversation