Previous Page | Next Page

Processing VSAM Data Sets in SAS Programs

Adding Records to a VSAM Data Set

When you add records to an existing VSAM data set, you must do the following:

  1. Specify the VSAMUPDATE system option.

  2. Include both an INFILE statement and a FILE statement with the same fileref and the VSAM option in the DATA step. Specify any other options in the INFILE statement, which must precede the FILE statement.

Note:   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. Because of this setup function, the INFILE statement is sometimes used without a corresponding INPUT statement.  [cautionend]

Ordinarily, the INFILE statement identifies an external data set to be read by an INPUT statement. However, when you add new records to an existing VSAM data set, you can use the INFILE statement without a corresponding INPUT statement (that is, without reading a record) because VSAM knows where to put the new records. Records are added in the following methods:

Previous Page | Next Page | Top of Page