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

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
  • 1 reply
  • 635 views
  • 2 likes
  • 2 in conversation