Variable Attributes - SAS Tutorial |

Process Advisors

*Subject to Terms and Condition

What are SAS Variables?

In addition to general information about the dataset, the descriptor portion contains information about the attributes of each variable in the data set. The attribute information includes the variables: Name, Type, Length, format, informat and label.


It identifies a variable that conforms to SAS naming rules. SAS naming Rule same as SAS data set.

  • 1-32 characters long
  • Must begin with letter or underscore
  • Can continue with any combination of numbers, letters or underscore


It identify variable as numeric or character. Character variables can contain any values such as letters; number and special characters can be of 1 to 32,767 characters long. Numeric variable can contain only numeric values.

Become a Data Science Architect IBM


It refers number of bytes used to store each of the variables value in a SAS data set. LENGTH statement can be used to set the length of both numeric and character variable.
For numeric variable, default length is 8. If you modify using LENGTH statement it affect the length of numeric values only in output dataset; during processing all numeric length is 8.
Looking for Top Jobs in Data Science ? This blog post gives you all the information you need!


A Format is an instruction that SAS uses to write data values. Format is used to control the written appearance of data values, or in some cases, to group data values together for analysis.
SAS software offers a variety of character, numeric, and date and time formats. Format scan be created and stored using FORMAT statement.
Can permanently assign a format to a variable in a SAS data set, or can temporarily specify a format in a PROC step to determine the way the data values appear in the output
Default format is BEST12. For numeric value
$w. for a character variable
This blog will help you get a better understanding of  SAS !


Used to read data values in certain formats into standard SAS values. It determines how data values are read into a SAS data set. Informats are used to read numeric values that contain letters or other special characters
Default informat is w.d for numeric value
$w. for a character variable


A variable can have a label consisting of descriptive text up to 256 characters long
By default, many reports identify variables by their names, to display more descriptive information about the variable assign a label to that variable.

To learn about file concepts, go through our blog on File concepts in SAS.

Course Schedule

Name Date Details
Big Data Course 30 Sep 2023(Sat-Sun) Weekend Batch
View Details
Big Data Course 07 Oct 2023(Sat-Sun) Weekend Batch
View Details
Big Data Course 14 Oct 2023(Sat-Sun) Weekend Batch
View Details

Leave a Reply

Your email address will not be published. Required fields are marked *