VBUFSIZE= System Option

Specifies the size of the view buffer.
Valid in: Configuration file, SAS invocation, OPTIONS statement, System Options window
Category: Input control: Data processing
PROC OPTIONS GROUP= INPUTCONTROL
Restriction: The VBUFSIZE= system option does not apply to SQL views.
Note: This option can be restricted by a site administrator. For more information, see Restricted Options.

Syntax

VBUFSIZE=n | nK | nM | nG | nT | hexX | MIN | MAX

Required Arguments

n | nK | nM | nG | nT
specifies the size of the view buffer in multiples of 1 (bytes); 1,024 (kilobytes); 1,048,576 (megabytes); 1,073,741,824 (gigabytes); or 1,099,511,627,776 (terabytes). For example, a value of 8 specifies 8 bytes, and a value of 3m specifies 3,145,728 bytes.
Default:32767
hexX
specifies the size of the view buffer as a hexadecimal value. You must specify the value beginning with a number (0–9), followed by an X. For example, the value fffeX specifies a buffer size of 65,534 bytes.
MIN
sets the minimum number of buffers to 0.
MAX
sets the view buffer size to 263–1, or approximately 9.2 quintillion bytes.
Note:If you set VBUFSIZE=MAX and your system does not have enough memory, SAS stops processing the view.

Details

The view buffer is a segment of memory that is allocated to hold output observations that are generated for a view. The size of the buffer determines how much data can be held in memory at one time.
The view buffer is shared between the request that opens the view (for example, a SAS procedure) and the view itself. Two computer tasks coordinate between requesting data and generating and returning the data as follows:
  • When a request task (such as a PRINT procedure) requests data, task switching occurs from the request task to the view task in order to execute the view and generate the observations. The view fills the view buffer with as many observations as possible.
  • When the view buffer is full, task switching occurs from the view task back to the request task in order to return the requested data. The observations are cleared from the view buffer.
The size of the view buffer and the size of an observation determine how many observations can be held in the buffer. To determine the observation length, use PROC CONTENTS for the view. The number of observations then determines how many times the computer must switch between the request task and the view task. The larger the view buffer is, the less task switching is needed to process a view, which can speed up execution time.
To improve efficiency, first determine how many observations fit into the default buffer size, then set the view buffer so that it can hold more generated observations.
If OBSBUF= is set for a view, SAS uses the value of OBSBUF= and not the value of VBUFSIZE= to determine the size of the view buffer.
The view buffer is released when the view completes execution.

Comparisons

The VBUFSIZE= system option enables you to specify the size of the view buffer based on a number of bytes. The number of observations that can be read into the view buffer at one time is the value of VBUFSIZE= divided by the length of the observation. VBUFSIZE= is a system option and is set for the length of a SAS session.
The OBSBUF= data set option sets the view buffer size based on a specified number of observations that can be read into the view buffer at one time. The size of the view buffer is determined by the value of OBSBUF= multiplied by the length of the observation. OBSBUF= is a data set option and is set for the length of processing a view.

See Also

Data Set Options:
OBSBUF= Data Set Option in SAS Data Set Options: Reference