You can use the code
editor to make your programs easier to read by automatically formatting
your code. When you automatically format your code, line breaks are
added, and each line is correctly indented according to its nesting
level. To format the code in the code editor, click
.
For example, the following
code is difficult to read because it lacks indention and logical line
breaks:
data topn;
length rank 8; label rank="Rank";
set topn; by &category descending &measure
if first.&category then rank=0; rank+1;
if rank le &n then output;
run;
After you use the automatic
code-formatting feature, the program looks like this:
data topn;
length rank 8;
label rank="Rank";
set topn;
by &category descending &measure
if first.&category then
rank=0;
rank+1;
if rank le &n then
output;
run;