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.

Demo: Understanding SAS program syntax

Demo: Understanding SAS program syntax

- [Instructor] Let's take a look at this program, and examine some of the rules we just discussed about SAS syntax. Now, this program is not spaced well. You'll notice we have multiple statements on a single line, the indention of certain statements is inconsistent. But let's try it and see if it runs successfully. I'll click the run button, take a look at the log, and notice there are no warnings or errors. The program seemed to run with no problem. Well let's return back to the code and see if we can improve the spacing to make the program more legible. This is so easy in SAS studio. All we need to do is click the format code button. And you'll notice that the program is spaced in a way that we can see each of the individual steps, and the statements within steps are indented. It's much easier to read. So let's make a few modifications to the code. I'll add a comment before the data statement. After typing the text of…

Contents