BookmarkSubscribeRSS Feed
Kamal5522
Obsidian | Level 7
As we know that we can not use special character in name of data set and variable etc because special character are used as operators so they are not allowed in name,however number can be used in name however name can not be started with number.
My question is why we can not start dataset and variable name with number, actually I want to know the logic behind it ?
2 REPLIES 2
Kurt_Bremser
Super User

The SAS interpreter and data step compiler treat every digit encountered after a separator (blank, comma, semicolon, linefeed etc) as the start of a number. The rules for names in the SAS language are very similar to other programming languages (eg C, PL/1, PASCAL) and aid compiler/interpreter design.

Ksharp
Super User

Maybe You could use dataset/variable name start with number.

Try this option.

 

options validmemname=extend validvarname=any;

 

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 2086 views
  • 2 likes
  • 3 in conversation