KEYSET_SIZE= Data Set Option

Specifies the number of rows in the cursor that the keyset drives.
Valid in: DATA and PROC steps (when accessing DBMS data using SAS/ACCESS software)
Default: LIBNAME setting
Requirement: This option is valid only when CURSOR_TYPE=KEYSET_DRIVEN.
Data source: Microsoft SQL Server, ODBC
See: KEYSET_SIZE= LIBNAME option

Syntax

KEYSET_SIZE=number-of-rows

Syntax Description

number-of-rows
specifies a positive integer from 0 through the number of rows in the cursor.

Details

If KEYSET_SIZE=0, the entire cursor is keyset-driven.
If you specify a value greater than 0, that value indicates the number of rows within the cursor that function as a keyset-driven cursor. When you scroll beyond the bounds that KEYSET_SIZE= specifies, the cursor becomes dynamic and new rows might be included in the cursor. This results in a new keyset, where the cursor functions as a keyset-driven cursor again.
When you specify a value between 1 and the number of rows in the cursor, the cursor is considered to be a mixed cursor. Part of the cursor functions as a keyset-driven cursor, and another part of the cursor functions as a dynamic cursor.