Processing a KSDS in a SAS Job |
Each record in a Key-Sequenced Data Set (KSDS) has a key that contains a unique value. KSDS records are retrieved by their key sequences. The key is a contiguous portion of the record and is defined when the data set is created. A KSDS is always defined with a prime index that relates the record's key value to its relative location in the data set. VSAM uses the index to locate a record for retrieval and to locate a collating position for record insertion. A KSDS is the most flexible approach for most applications because the record can be accessed directly via the key field. Access is not dependent on the physical location of the record in the data set.
You can read, add, update, and erase KSDS records in SAS programs. The options that are associated with each of these operations are described in the following sections. In many cases, the option's meaning depends on how it is used within a SAS program. (Loading KSDS records is discussed separately in Defining and Loading a VSAM Data Set.)
Here are two helpful tables and their descriptions:
SAS Options for a KSDS lists the options that are significant for processing KSDS records.
Access Types for KSDS Operations summarizes the access type for KSDS operations.
For information on using an ESDS in SAS jobs, see Processing an ESDS in a SAS Job. For information on using an RRDS, see Processing an RRDS in a SAS Job.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.