O'Reilly logo

SAS 9.4 Language Reference, 6th Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3
Rules for Words and Names in the
SAS Language
Words in the SAS Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Definition of Word . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Types of Words or Tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Placement and Spacing of Words in SAS Statements . . . . . . . . . . . . . . . . . . . . . . . 23
Names in the SAS Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Definition of a SAS Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Rules for User-Supplied SAS Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
SAS Name Literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Summary of Default Rules for Naming SAS Data Sets and SAS Variables . . . . . . 33
Summary of Extended Rules for Naming SAS Data Sets and SAS Variables . . . . . 34
Words in the SAS Language
Definition of Word
A word or token in the SAS programming language is a collection of characters that
communicates a meaning to SAS and which cannot be divided into smaller units that can
be used independently. A word can contain a maximum of 32,767 bytes.
A word or token ends when SAS encounters one of the following:
the beginning of a new token
a blank after a name or a number token
the ending quotation mark of a literal token
Each word or token in the SAS language belongs to one of four categories:
names
literals
numbers
special characters
Types of Words or Tokens
There are four basic types of words or tokens:
21

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required