3.5 - SAS System Options

3.5 - SAS System Options

Here's a topic that can really be brought up anywhere and therefore doesn't necessarily belong in this lesson. On the other hand, it's a subject that we don't want to wait too long to introduce, because of its inherent benefits. So, let's go ahead and do it now before any more time passes by.

SAS System options are parameters that you set that affect how SAS works, how SAS formats your output, how SAS uses memory, how SAS handles errors, and so on. All SAS System options have default settings that are used unless you specify otherwise. For example, page numbers are automatically displayed on your output. To modify system options, we just need to submit an OPTIONS statement. Here's one example of an OPTIONS statement that you might want to include at the beginning of each of your SAS programs:

Option PS = 60 LS = 80 NODATE;

The above statement tells SAS that you want:

  • each page of output to contain no more than 60 lines (PS = 60, where PS stands for "pagesize")
  • each line of output to contain no more than 80 characters (LS = 80, where LS stands for "linesize")
  • each page of output to contain no date and time at which the output was created

You can place an OPTIONS statement anywhere in a SAS program to change the settings from that point onward. However, it is good programming practice to place OPTIONS statements outside of DATA or PROC steps so that your programs are easier to read and debug.

In general, the common options you might consider specifying are:

  • CENTER or NOCENTER. CENTER, which is the default, centers the text in your output.
  • DATE or NODATE. DATE, which is the default, prints the current date and time on your output, while NODATE doesn't.
  • NUMBER or NONUMBER. NUMBER, which is the default, prints an accumulative page number on each page of your output.
  • LINESIZE = n, where n can be any number between 64 and 256 (inclusive), specifies the width of the print line for your procedure output and log. Observations that do not fit within the line size continue on a different line or page.
  • PAGESIZE = n, where n can be any number between 15 and 32767 (inclusive), specifies how many lines each page of output contains.
  • PAGENO = n, where n is the page number at which you want SAS to start numbering your output pages. If you don't specify the PAGENO= option, your output is numbered sequentially throughout your SAS session, starting with page 1.

There are just a couple of things to keep in mind about the OPTIONS statement. First, it is a global statement, meaning it affects every DATA step and PROC step that follows it. Second, it overrides any previous OPTIONS statements. In this sense, you can think of the options you specify as toggle switches. The options stay in place until you change them with a new OPTIONS statement or you end your SAS session. We certainly encourage you to use OPTIONS statements throughout this course (and beyond!) to make your output more user friendly.


Legend
[1]Link
Has Tooltip/Popover
 Toggleable Visibility