Data Step Processing [4-9]


Input Buffer and PDV

If the code contains no syntax errors, SAS proceeds to create three parts that are necessary to build the data sets:

  • Input Buffer
  • Program Data Vector (PDV)
  • Descriptor Portion of Data Set

Each of these is explained in the next few sections.

​Input Buffer

The input buffer is the area where the data passes through before being written to the data set.

It has individual cells similar to the image below:

When reading raw data from an external source, the data is temporarily read into the input buffer before being read into the program data vector (PDV).

​An example will be demonstrated shortly.

​Note: the input buffer is created only when the data comes from external sources.

If the data come from a SAS data set, the data goes straight to the program data vector.

The official definition of the input buffer is as follow:

​Input buffer is a logical area in memory into which SAS reads each record of raw data when SAS executes an INPUT statement. Note that this buffer is created only when the DATA step reads raw data. (When the DATA step reads a SAS data set, SAS reads the data directly into the program data vector.)