Hello
I am using proc append.
I get warning "WARNING: Variable OR has different lengths on BASE and DATA files ."
The more serios problem is that the length of variable OR is not enough and I cannot see the full name on output.
Any solution please?
%macro RRR1(CAT);
title "&CAT.";
proc sql;
create table temp as
select "&CAT." as OR ,
sum(&CAT. ) as Nr_yes,
sum(case when &CAT. ne 1 then 1 else 0 end ) as Nr_No
from ttt
;
quit;
proc append base=Wanted data=temp force nowarn;
run;
%mend;
%RRR1(CAT=X1);
%RRR1(CAT=X2)
%RRR1(CAT=X3)
%RRR1(CAT=X4)
title;
proc print data=wanted noobs;run;
Make sure that your base data set has the longest length ever to occur in any of your data you intend to append.
Make sure that your base data set has the longest length ever to occur in any of your data you intend to append.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.