BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Ronein
Meteorite | Level 14

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;
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Make sure that your base data set has the longest length ever to occur in any of your data you intend to append.

 

 

 

View solution in original post

1 REPLY 1
ballardw
Super User

Make sure that your base data set has the longest length ever to occur in any of your data you intend to append.

 

 

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 374 views
  • 1 like
  • 2 in conversation