BookmarkSubscribeRSS Feed
dwasch1
Calcite | Level 5

I am confused by the variable length assigned to newvar in the following code:

 

data carstemp;
Set sashelp.cars;
newvar=catx(make,model,'');
run;

 

newvar is assigned a length of 200 in the temporary table. What is the logic behind this length value? I had assumed length would either adopt the value from the variables make or model, or perhaps be assigned the standard 8.

 

 

1 REPLY 1

CFC_SAS_Communities_400x225.jpgCFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

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
  • 1047 views
  • 2 likes
  • 2 in conversation