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

AI Navigator GIF.gif


Navigate AI governance with SAS tools for compliance and ethical AI practices. Try SAS Ai Navigator for free for the first six months.

Check it out on Microsoft Marketplace →

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