FASTKNN Procedure

OUTPUT Statement

  • OUTPUT OUT=libref.data-table <option>;

The OUTPUT statement creates a nearest-neighbors data table to contain the results of the procedure run.

You must specify the following option:

OUT=libref.data-table

names the output data table for PROC FASTKNN to use. You must specify this option before any other options. libref.data-table is a two-level name, where

libref

refers to a collection of information that is defined in the LIBNAME statement and includes the library, which includes a path to where the data table is to be stored. For more information about libref, see the section Using SAS Viya Workbench.

data-table

specifies the name of the output data table.

You can also specify the following option:

COPYVAR=variable
COPYVARS=(variables)

lists one or more variables from the input data table to be transferred to the output data table.

Last updated: September 23, 2026