Layout of a SAS Program

When creating a SAS program, the layout is flexible. It is good programming practice, however, to format your program in a neat-looking fashion so that it is easy to read and execute. Remember that a SAS program is made up of SAS statements and SAS statements analyze data. The SAS program is the shell that holds the statements. You should avoid writing code that is difficult to read. Here is an example of good layout:
Data myfolder.inventory;
	infile "/folders/myfolders/garden.dat";
	input vegetables $ fruit $;
Run;

PROC PRINT data=myfolder.inventory;
Run;
In the code, there are several SAS statements, each ending with a semicolon. In addition to the code, you can add comments. Comments make your program more understandable, ...

Get A Recipe for Success Using SAS University 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.