|
楼主
楼主 |
发表于 2004-3-20 08:51:38
|
只看该作者
SAS top 10 System Options
Tip: Top 10 System Options
System options make it possible to control many of the details of the way the SAS System operates. For example, you can control the size of the page in the log file and the level of detail of log messages. With other system options, you can control the way missing values are displayed and the way the SAS Supervisor searches for formats. There are several hundred system options.
Among the hundreds of system options, the ten most popular account for close to half of all system option use. These ten options also illustrate the variations in usage among system options.
1 SYSIN When you start a SAS session in batch mode (or just a SAS process) the SYSIN= option identifies the SAS program file to run. The value of the option is the file name. This is an example of the SYSIN option in an operating system command line:
sas -sysin myprogram.sas
This is an example of a statement that starts a SAS process to run a SAS program:
STARTSAS SYSIN="myprogram.sas";
The SYSIN= option is a startup option; it cannot be changed after a SAS session or process has started.
2 CONFIG The CONFIG= option also provides a file name, or possibly a list of files. It is an initialization option; it can only be set at the start of the SAS session. Most initialization options are set in the configuration file, but since the CONFIG= option identifies the configuration file, it is usually set in the operating system command line.
3 AUTOEXEC Another startup option, the AUTOEXEC= option identifies an autoexec file, an initialization program that executes at the beginning of the SAS session. The autoexec file typically includes global statements such as LIBNAME and TITLE statements. This line in a configuration file might identify the autoexec file:
-autoexec "myinit.sas"
To tell the SAS supervisor not to execute and autoexec file, even though one is present, you can use this option with the NO prefix, for example:
-noautoexec
4 LINESIZE The LINESIZE= system option determines the number of characters in a line in print optput files, including the log and standard print files. The LINESIZE= option is a session option; it can be changed at any point in a SAS session. The LINESIZE= option can also be identified by its alias, LS. For example, this statement sets the LINESIZE= option to 75:
Options LS=75;
The values for the LINESIZE= option are limited to the range from 64 to 256.
5 PAGESIZE Similarly, the PAGESIZE= system option determines the number of lines in a page. Its alias is PS. Its values are limited to the range from 15 to 32767.
6 CENTER The CENTER option determines whether title lines and proc output are centered or left-aligned. It is a Boolean option; you can turn it on or off by writing the word CENTER or NOCENTER, for example:
OPTIONS CENTER;
The alias for the CENTER option is an alternate spelling, CENTRE.
7 PAGENO The PAGENO= option is the page number for the next page of print output the SAS program writes. The SAS supervisor automatically updates the value when it writes a page of output. To reset the page number to 1, use this statement:
OPTIONS PAGENO=1;
The value for the PAGENO= option can only be a positive integer value. The alias for the PAGENO= option is the abbreviation PAGNO.
8 YEARCUTOFF The YEARCUTOFF= option determines how the two-digit years are interpreted. The value of the option is the earliest year that a two-digit year could be mapped to. For example, if two-digit years fall in the range from 1942 to 2041, set the option as
OPTIONS YEARCUTOFF=1942;
Values are limited to the range from 1582 to 19900.
9 OBS The OBS= option limits the number of observations or records that a data step statement or proc step reads from an input file. For example, with the option OBS=1, it stops after reading only 1 observation or record. The value can be a whole number or the word MAX. The word MAX represents the idea of using all available observations or records, but it actually indicates a large positive integer, such as 2147483647.
10 COMPRESS The COMPRESS= option sets the compression routine that is used when new SAS data files are created. When you set the option you can provide any word or name as a value, but only a few values actually make it possible to create SAS data files: YES, NO, or the name of an installed compression routine. The compression routines in SAS Version 8 are CHAR and BINARY. YES is an alias for CHAR. NO indicates not to use a compression routine when creating SAS data files.
COMPRESS= is also a dataset option you can use when you create a specific SAS data file. The system option applies when the dataset option is not used. To put it another way, the COMPRESS= system option provides a default for the COMPRESS= dataset option. |
|