Editing SAS Programs

Now that you know how to open a SAS program, let's review the characteristics of SAS statements and look at enhancing the readability of your SAS programs.

SAS Program Structure

Remember that SAS programs consist of SAS statements. Consider the SAS program that is shown in a code editing window below.
An Example SAS Program
SAS Program Structure
Although you can write SAS statements in almost any format, a consistent layout enhances readability and helps you understand the program's purpose. It's a good idea to
  • begin DATA and PROC steps in column one
  • indent statements within a step
  • begin RUN statements in column one
  • include ...

Get SAS Certification Prep Guide: Base Programming for SAS 9, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.