Sum-up With OPTIONS


Objective of this page is to discuss about various options in SAS that can be set locally to control the way SAS process data or display output.

SAS system options control many aspects of your SAS session, including the efficiency of program execution, and the attributes of SAS files and data libraries. These options come with default values supplied by SAS or set locally.  Some of these options are often used.

FIRSTOBS=:  causes SAS to begin reading at a specified observation in a data set. If SAS is processing a file of raw data, this option forces SAS to begin reading at a specified line of data. The default is firstobs=1.

Usage:  options firstobs=3;

OBS= : specifies the last observation from a data set or the last record from a raw data file that SAS is to read. To return to using all observations in a data set use obs=max. This is used when we wanted to read only a few records from large dataset for testing purposes.

Usage: options obs=10  ;  options obs=max ;

NODATE= : suppresses  the printing of date and time to the log and output window. By default, the date and time is always printed

Usage: options nodate   ;

COMPRESS=: Compresses the SAS dataset being created. COMPRESS is a great space saver . Whenever we work with large data files make sure that this option is explicitly specified as it compressed the dataset up to 65% of its original size.

Usage:  options compress =yes|No ;

ERRORS= : controls the maximum number of observations for which complete error messages are printed. The default maximum number of complete error messages is errors=20. 

Usage: options errors =100;

There are a few  other options that help to control the way SAS processes data. Please consult the SAS help for a complete list.

Copyright free public information. All trademarks,service marks, logos and names are properties of their respective owners.