What is the default length of character variable in SAS?
Also, what is the maximum length of a character variable in SAS?
A character variable is a variable whose value contains letters, numbers, and special characters, and whose length can be from 1 to 32,767 characters long. You may need to open a track with Tech Support if you find that you have issues with the length of your character variable.
Also question is, how do I set the length of a character variable in SAS?
For character variables, you must allow for the longest possible value in the first statement that uses the variable, because you cannot change the length with a subsequent LENGTH statement within the same DATA step. The maximum length of any character variable in the SAS System is 32,767 bytes.
The default length of numeric variables in SAS data sets is 8 bytes. (You can control the length of SAS numeric variables with the LENGTH statement in the DATA step.) In the SAS System under Windows, the Windows data type of numeric values that have a length of 8 is LONG REAL.