Previous Page | Next Page

SCL Fundamentals

Names in SCL

In SCL, the rules for names are

  1. Librefs and filerefs can have a maximum length of 8 characters. Other names -- including names of SCL variables, arrays, SCL lists, SAS tables, views, indexes, catalogs, catalog entries, macros, and macro variables -- can be 32 characters long.

  2. The first character must be a letter (A, B, C, . . . , Z) or an underscore (_). Subsequent characters can be letters, numeric digits (0, 1, . . . , 9), or underscores.

  3. Names are stored in the case in which they are entered, which can be lower case, mixed case, or upper case.

  4. Names cannot contain blanks.

  5. SCL honors the names that are reserved by SAS software for automatic variables, lists of variables, SAS tables, and librefs. Thus, you cannot use these names in your SCL programs.

    1. When creating variables, do not use the names of special SAS automatic variables (for example, _N_ and _ERROR_) nor the names of lists of variables (for example, _CHARACTER_, _NUMERIC_, and _ALL_).

    2. Do not use any of the following names as a libref:

      • SASCAT

      • SASHELP

      • SASMSG

      • SASUSER

      • USER

      • WORK

      Use LIBRARY only as the libref to point to a SAS data library containing a FORMATS catalog that was created with PROC FORMAT.
    3. Do not assign any of the following names to a SAS table:

      • _NULL_

      • _DATA_

      • _LAST_

Just as SCL recognizes keywords from position and context, it also recognizes names in the same way. If SCL sees a word that meets the requirements for a user-supplied SAS name and that is not used in a syntax that defines it as anything else, it interprets the word as a variable name.

Previous Page | Next Page | Top of Page