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;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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