From the course: SAS® 9.4 Cert Prep: Part 01 SAS Programming Essentials

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

SAS program syntax

SAS program syntax

- [Instructor] Now let's talk about some details of SAS syntax. These two programs have exactly the same code. Spacing doesn't matter to SAS, but it does matter to people reading your code. It's a good idea to use spaces and extra lines to make your program easy to read and understand. There are also tools in your program editor that format code for you. You can type unquoted values, such as columns, table names, or keywords, in any case. You can add comments to your code that are ignored when the program executes. You can use these comments to document your code, or suppress a portion of your code from executing. To comment out a single statement ending in a semicolon, you add an asterisk at the beginning of the statement. To comment out multiple lines of code, you add slash asterisk at the beginning, and asterisk slash at the end of the text you want to comment out.

Contents