Using the Special SAS Options

The special SAS options that are used for processing VSAM data sets fall into three functional categories:
  • options that describe the characteristics of the VSAM data set and how SAS is to process it
  • record retrieval options (options processed by the INPUT statement)
  • record storage options (options processed by the PUT statement)
See SAS Options for an ESDS, SAS Options for a KSDS, and SAS Options for an RRDS for information about how each special SAS option functions when it is used with the three VSAM data set types.
You specify the special SAS options in the INFILE statement except when you load a new VSAM data set with initial records. When you load a new VSAM data set, you specify the special SAS options in the FILE statement.
There are three important points concerning the INFILE statement with VSAM data sets:
  1. Because VSAM options are specified in the INFILE statement, this statement has the extra function of setting up how an operation is to be performed.
  2. Because of this setup function, the INFILE statement is sometimes used without a corresponding INPUT statement.
  3. The INFILE statement is not used to load records. Thus, loading records is treated as a special case and is discussed separately in Defining and Loading a VSAM Data Set.
Here is the syntax for using the special options in the INFILE statement:
INFILE data-set-specification <options>;
data-set-specification is a SAS fileref or a physical filename, and options are a combination of standard and special INFILE statement options.
A number of the SAS VSAM options specify SAS variables that contain values that control VSAM operations. The settings of such variables are not constants. They can be changed within a DATA step with SAS assignment statements. Variables that are specified by the ERASE= and FEEDBACK= options must be reset in a DATA step.
The variables specified by SAS VSAM options are not automatically added to any output SAS data set.