Assigns an alter password to a SAS file and enables access to a password-protected SAS file
Valid in: DATA step and PROC steps
Category: Data Set Control
See: ALTER= Data Set Option in the documentation for your operating environment.
ALTER= alter-password
alter-password
must be a valid SAS name . See 'Rules for Words and Names in the SAS Language' in SAS Language Reference: Concepts .
The ALTER= option applies to all types of SAS files except catalogs. You can use this option to assign an alter-password to a SAS file or to access a read-protected, write-protected, or alter-protected SAS file.
When replacing a SAS data set that is alter protected, the new data set inherits the alter password. To change the alter password for the new data set, use the MODIFY statement in the DATASETS procedure.
Note: A SAS password does not control access to a SAS file beyond the SAS system. You should use the operating system-supplied utilities and file-system security controls in order to control access to SAS files outside of SAS.
Data Set Options:
'ENCRYPT= Data Set Option' on page 18
'PW= Data Set Option' on page 43
'READ= Data Set Option' on page 45
'WRITE= Data Set Option' on page 65
'File Protection' in SAS Language Reference: Concepts
'Manipulating Passwords' in 'The DATASETS Procedure' in Base SAS Procedures Guide
Specifies the number of buffers to be allocated for processing a SAS data set
Valid in: DATA step and PROC steps
Category: Data Set Control
BUFNO= n n K hex X MIN MAX
n n K
specifies the number of buffers in multiples of 1 (bytes); 1,024 (kilobytes). For example, a value of 8 specifies 8 buffers, and a value of 1k specifies 1024 buffers.
hex
specifies the number of buffers as a hexadecimal value. You must specify the value beginning with a number (0-9), followed by an X. For example, the value 2dx sets the number of buffers to 45 buffers.
MIN
sets the minimum number of buffers to 0, which causes SAS to use the minimum optimal value for the operating environment. This is the default.
MAX
sets the number of buffers to the maximum possible number in your operating environment, up to the largest four-byte, signed integer, which is 2 31 -1, or approximately 2 billion.
The buffer number is not a permanent attribute of the data set; it is valid only for the current SAS session or job.
BUFNO= applies to SAS data sets that are opened for input, output, or update.
A larger number of buffers can speed up execution time by limiting the number of input and output (I/O) operations that are required for a particular SAS data set. However, the improvement in execution time comes at the expense of increased memory consumption.
To reduce I/O operations on a small data set as well as speed execution time, allocate one buffer for each page of data to be processed . This technique is most effective if you read the same observations several times during processing.
If the BUFNO= data set option is not specified, then the value of the BUFNO= system option is used. If both are specified in the same SAS session, the value specified for the BUFNO= data set option overrides the value specified for the BUFNO= system option.
To request that SAS allocate the number of buffers based on the number of data set pages and index file pages, use the SASFILE global statement.
Data Set Options:
'BUFSIZE= Data Set Option' on page 12
System Options:
'BUFNO= System Option' on page 1480
Statements:
'SASFILE Statement' on page 1389
Specifies the permanent buffer page size for an output SAS data set
Valid in: DATA step and PROC steps
Category: Data Set Control
Restriction: Use with output data sets only.
See: BUFSIZE= Data Set Option in the documentation for your operating environment.
BUFSIZE= n n K n M n G hex X MAX
n n K n M n G
specifies the page size in multiples of 1 (bytes); 1,024 (kilobytes); 1,048,576 (megabytes); or 1,073,741,824 (gigabytes). For example, a value of 8 specifies a page size of 8 bytes, and a value of 4k specifies a page size of 4096 bytes.
The default is 0, which causes SAS to use the minimum optimal page size for the operating environment.
hex X
specifies the page size as a hexadecimal value. You must specify the value beginning with a number (0-9), followed by an X. For example, the value 2dx sets the page size to 45 bytes.
MAX
sets the page size to the maximum possible number in your operating environment, up to the largest four-byte, signed integer, which is 2 31 -1, or approximately 2 billion bytes.
The page size is the amount of data that can be transferred for a single I/O operation to one buffer. The page size is a permanent attribute of the data set and is used when the data set is processed.
A larger page size can speed up execution time by reducing the number of times SAS has to read from or write to the storage medium. However, the improvement in execution time comes at the cost of increased memory consumption.
To change the page size, use a DATA step to copy the data set and either specify a new page or use the SAS default. To reset the page size to the default value in your operating environment, use BUFSIZE=0.
Note: If you use the COPY procedure to copy a data set to another library that is allocated with a different engine, the specified page size of the data set is not retained.
Operating Environment Information: The default value for BUFSIZE= is determined by your operating environment and is set to optimize sequential access. To improve performance for direct (random) access, you should change the value for BUFSIZE=.
For the default setting and possible settings for direct access, see the BUFSIZE= data set option in the SAS documentation for your operating environment.
If the BUFSIZE= data set option is not specified, then the value of the BUFSIZE= system option is used. If both are specified in the same SAS session, the BUFSIZE= data set option overrides the value specified for the BUFSIZE= system option.
Data Set Options:
'BUFNO= Data Set Option' on page 10
System Options:
'BUFSIZE= System Option' on page 1481
Specifies the level of shared access to SAS data sets
Valid in: DATA step and PROC steps
Category: Data Set Control
Restriction: Specify for input data sets only.
CNTLLEV=LIB MEM REC
LIB
specifies that concurrent access is controlled at the library level. Library-level control restricts concurrent access to only one update process to the library.
MEM
specifies that concurrent access is controlled at the SAS data set (or member) level. Member-level control restricts concurrent access to only one update or output process but allows read access to many sessions, procedures, or statements.
REC
specifies that concurrent access is controlled at the observation (or record) level. Record-level control allows more than one update access to the same SAS data set, but it denies concurrent update of the same observation.
The CNTLLEV= option specifies the level at which shared update access to a SAS data set is denied . A SAS data set can be opened concurrently by more than one SAS session or by more than one statement, window, or procedure within a single session. By default, SAS procedures permit the greatest degree of concurrent access possible while they guarantee the integrity of the data and the data analysis. Therefore, you do not normally use the CNTLLEV= data set option.
Use this option when
your application controls the access to the data, such as in SAS Component Language (SCL), SAS/IML software, or DATA step programming
you access data through an interface engine that does not provide member-level control of the data.
If you use CNTLLEV=REC and the SAS procedure needs member-level control for integrity of the data analysis, SAS prints a warning to the SAS log that inaccurate or unpredictable results can occur if the data are updated by another process during the analysis.
In the following example, the first SET statement changes the shared access level from the default of member to record by specifying the CNTLLEV= data set option. The second SET statement changes the shared access level from record back to member. This might be done to ensure that a data set does not change while you are processing it.
set datalib.fuel (cntllev=rec) point=obsnum; set datalib.fuel (cntllev=mem); by area;
Controls the compression of observations in an output SAS data set
Valid in: DATA step and PROC steps
Category: Data Set Control
Restriction: Use with output data sets only.
COMPRESS=NO YES CHAR BINARY
NO
specifies that the observations in a newly created SAS data set are uncompressed (fixed-length records).
YES CHAR
specifies that the observations in a newly created SAS data set are compressed (variable-length records) by SAS using RLE (Run Length Encoding). RLE compresses observations by reducing repeated consecutive characters (including blanks) to two-byte or three-byte representations.
Alias: ON
Tip: Use this compression algorithm for character data.
Note: COMPRESS=CHAR is accepted by Version 7 and later versions.
BINARY
specifies that the observations in a newly created SAS data set are compressed (variable-length records) by SAS using RDC (Ross Data Compression). RDC combines run-length encoding and sliding-window compression to compress the file.
Tip: This method is highly effective for compressing medium to large (several hundred bytes or larger) blocks of binary data (numeric variables ). Because the compression function operates on a single record at a time, the record length needs to be several hundred bytes or larger for effective compression.
Compressing a file is a process that reduces the number of bytes required to represent each observation. Advantages of compressing a file include reduced storage requirements for the file and fewer I/O operations necessary to read or write to the data during processing. However, more CPU resources are required to read a compressed file (because of the overhead of uncompressing each observation), and there are situations where the resulting file size might increase rather than decrease.
Use the COMPRESS= data set option to compress an individual file. Specify the option for output data sets only-that is, data sets named in the DATA statement of a DATA step or in the OUT= option of a SAS procedure. Use the COMPRESS= data set option only when you are creating a SAS data file (member type DATA). You cannot compress SAS views, because they contain no data.
After a file is compressed, the setting is a permanent attribute of the file, which means that to change the setting, you must re-create the file. That is, to uncompress a file, specify COMPRESS=NO for a DATA step that copies the compressed file.
The COMPRESS= data set option overrides the COMPRESS= option on the LIBNAME statement and the COMPRESS= system option.
The data set option POINTOBS=YES, which is the default, determines that a compressed data set can be processed with random access (by observation number) rather than sequential access. With random access, you can specify an observation number in the FSEDIT procedure and the POINT= option in the SET and MODIFY statements.
When you create a compressed file, you can also specify REUSE=YES (as a data set option or system option) in order to track and reuse space. With REUSE=YES, new observations are inserted in space freed when other observations are updated or deleted. When the default REUSE=NO is in effect, new observations are appended to the existing file.
POINTOBS=YES and REUSE=YES are mutually exclusive-that is, they cannot be used together. REUSE=YES takes precedence over POINTOBS=YES; that is, if you set REUSE=YES, SAS automatically sets POINTOBS=NO. For example, the following statement results in a compressed data file that cannot be processed with random access:
The TAPE engine supports the COMPRESS= data set option, but the engine does not support the COMPRESS= system option.
The XPORT engine does not support compression.
Data Set Options:
'POINTOBS= Data Set Option' on page 42
'REUSE= Data Set Option' on page 49
Statements:
'LIBNAME Statement' on page 1284
System Options:
'COMPRESS= System Option' on page 1498
'REUSE= System Option' on page 1590
'Compressing Data Files' in SAS Language Reference: Concepts
Specifies what type of action to take when a SAS data set in a SAS data library is detected as damaged
Valid in: DATA step and PROC steps
Category: Data Set Control
DLDMGACTION=FAIL ABORT REPAIR PROMPT
FAIL
stops the step, issues an error message to the log immediately. This is the default for batch mode.
ABORT
terminates the step, issues an error message to the log, and aborts the SAS session.
REPAIR
automatically repairs and rebuilds indexes and integrity constraints, unless the data set is truncated. You use the REPAIR statement in PROC DATASETS to restore a truncated data set. It issues a warning message to the log. This is the default for interactive mode.
PROMPT
displays a requestor window that asks you to select the FAIL, ABORT, or REPAIR action.
Excludes variables from processing or from output SAS data sets
Valid in: DATA step and PROC steps
Category: Variable Control
|