Chapter Contents |
Previous |
Next |
SASNAME |
Category: | Utility |
Syntax | |
Details | |
Example |
Syntax |
rc=SASNAME(name); |
1 | The name is a valid SAS name. |
0 | The name is not a valid SAS name. |
Type: Numeric
Type: Character
Details |
SASNAME verifies that a specified name is a valid SAS name. SAS names can be up to 32 characters long. The first character must be a letter (A, B, C, . . . , Z) or underscore (_). Other characters can be letters, numbers (0, 1, . . . , 9), or underscores. Blanks cannot appear in SAS names, and special characters (for example, $, @, #), except underscores, are not allowed.
Example |
erroroff catalogname; rc=sasname('catalogname'); if (rc=0) then do; erroron 'catalogname'; _msg_= 'Catalog name is invalid.'; end;
Note: In this example, the value for CATALOGNAME must
be a one-level SAS name. SASNAME considers a two-level name of the form libref.catalog-name invalid because it contains the dot (.)
character.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.