HOME Module List Site Index About This Site glossary" Resources Innovative Technology Center UT Statistics Courses
Using SAS Choose Design ANOVA Compare Means Regression Examples
Using SAS Using SAS: Table of Contents

Common SAS syntax rules

You will need to create SAS names for a variety of purposes, naming datasets and variables, for example. This simple program illustrates both types of names.
one is the name of a SAS dataset being created, and X is the name of a variable being read in.

Rules for SAS names are:
      must start with a letter
      must not be longer than 32 characters
      must not contain special characters
Special characters include "+-/*=", any of which would be interpreted as mathematical instructions. Spaces are clearly not allowed, as one name would be read as two. The underscore character is about the only special character permitted, and allows names like Weight_Gain to be more readable.

Short names are recommended, as these names will be used throughout the program. But the names should be meaningful, particularly variable names, as they will appear in the output.

SAS is case aware, but not sensitive. If you define a variable Weight_Gain, then it will appear in all output with that capitalization, but you can refer to the variable as weight_gain. Because of this, you can not have two variables in the same dataset called A and a.



Related Topics:                                                                                                     Using SAS: Table of Contents

Home | Contact us | Module list & summary | Glossary/Terms | About this site | Stats courses | Links | Index