SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
raelynfate
Calcite | Level 5

I am trying to convert an XPT file to SAS

 

My code:

libname sasfile '/folders/myfolders/';
libname xptfile xport '/folders/myfolders/LLCP2018.XPT' access=readonly;
proc copy inlib=xptfile outlib=sasfile;
run;

 

Log:

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 libname sasfile '/folders/myfolders/';
NOTE: Libref SASFILE was successfully assigned as follows:
Engine: V9
Physical Name: /folders/myfolders
74 libname xptfile xport '/folders/myfolders/LLCP2018.XPT' access=readonly;
NOTE: Libref XPTFILE was successfully assigned as follows:
Engine: XPORT
Physical Name: /folders/myfolders/LLCP2018.XPT
75 proc copy inlib=xptfile outlib=sasfile;
76 run;
 
NOTE: Input library XPTFILE is sequential.
ERROR: Physical file does not exist, /folders/myfolders/LLCP2018.XPT.
NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE COPY used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 
NOTE: The SAS System stopped processing this step because of errors.
77
78 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
90
 

What am I doing wrong?

1 REPLY 1
Reeza
Super User
SAS UE can be case sensitive. I would go to the Files, Folders and Servers Pane, find the XPT file, right click, select properties and use the path there in your code.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 1 reply
  • 851 views
  • 0 likes
  • 2 in conversation