*Copyright @ www.mycsg.in;
Are there any rules?
Elements of the SAS Language
The SAS language contains
- statements
- expressions
- functions and CALL routines
- options
- formats
- informats
Rules for SAS Statements
- SAS statements end with a semicolon
- You can enter SAS statements in lowercase, uppercase, or a mixture of the two
- You can begin SAS statements in any column of a line and write several statements on the same line
- You can begin a statement on one line and continue it on another line, but you cannot split a word between two lines
- Words in SAS statements are separated by blanks or by special characters
Rules for Most SAS Names
SAS names are used for SAS data set names, variable names, and other items. The following rules apply:
- A SAS name can contain from one to 32 characters
- The first character must be a letter or an underscore (_)
- Subsequent characters must be letters, numbers, or underscores
- Blanks cannot appear in SAS names
Dataset names
- All rules specfied in 'Rules for Most SAS Names' are applicable
Variable names
- All rules specfied in 'Rules for Most SAS Names' are applicable
- Variable names are NOT case sensitive. 'Age', 'AGE', 'age' - all of these represent the same variable
Library names
Format names
Informat names