BookmarkSubscribeRSS Feed
BrahmanandaRao
Lapis Lazuli | Level 10
data ds;
input id var ;
datalines;
1 20
2 200
3 450
;
run;


data ds1;
input id var$ ;
datalines;
1 AA1 
2 BB2
;
run;


data concat;
set ds ds1;
proc print;
run; 

 

Anandkvn_0-1625027991509.png

 

 

2 REPLIES 2
Kurt_Bremser
Super User

Do a search for "variable has been defined as numeric and character" here on the communities, and you'll find your answer. This topic has come up hundreds of times.

ballardw
Super User

 You are appending data sets. Variables of the same name must be of the same type. And if they are of different lengths you will get warnings about possible truncation of data.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 2 replies
  • 542 views
  • 0 likes
  • 3 in conversation