Chapter Contents


SAS Macro Language: Reference

SAS Tokens

When the SAS System processes a program, a component called the word scanner reads the program, character by character, and groups the characters into words. These words are referred to as tokens. The SAS System recognizes four general types of tokens:

One or more characters enclosed in single or double quotes. Examples of literals include

'CARY' "1997"
'Dr. Kemple-Long' '<entry align="center">'

One or more characters beginning with a letter or an underscore. Later characters can be letters, underscores, and digits.

data _test linesleft
f25 univariate otherwise
year_97 descending

A numeric value. Number tokens include

Special character
Any character that is not a letter, number, or underscore. Examples of special characters include

= + - % & ; ( )

The maximum length of any type of token is 200 characters. A token ends when the tokenizer encounters one of the following situations:

Chapter Contents



Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.