Hello,
I am getting below Warning message when i use PROC COPY for XPT to SAS7BDAT for entire XPT files folder
"WARNING : Labels exceeding length 40 are not supported by engine XPORT and are being truncated "
But in My data set there no labels and i am using below code.
/*Loop through all datasets within the directory.*/
%do Xpt2Lib_i=1 %to &Xpt2Lib_n.;
data _null_;
set &Xpt2Lib_templib..XPTFILES;
where "&&Xpt2Lib_ds_&Xpt2Lib_i." eq strip(dataset);
call symput('Xpt2Lib_dataset',DATASET);
call symput('Xpt2Lib_xpt',FILENAME);
run;
%let Xpt2Lib_dataset=&Xpt2Lib_dataset.;
%let Xpt2Lib_xpt=&Xpt2Lib_xpt.;
/*Copy from XPT format.*/
libname XPTLIB xport "&Xpt2Lib_xpt.";
proc copy in=XPTLIB out=&libOut. memtype=data;
run;
libname XPTLIB clear;
One might ask why you are using the older XPORT instead of Proc Cport /Cimport to move files.
The XPORT engine has a number of limitations.
And when it comes to such warnings from SAS I tend to believe the warning without something like Proc Contents output of every single data set showing the variable labels.
It is not an error and the output should have been created. If you actually believe that you did not lose any label text there is nothing to worry about unless you have some requirement for clean logs. In which case you have a choice of 1) double checking your label lengths and fixing them or 2) using a different method, i.e. Proc Cport/Cimport.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.