z/OS DFSMS Using Data Sets
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Keyed-Sequential Access

z/OS DFSMS Using Data Sets
SC23-6855-00

Sequential access is used to load a key-sequenced data set and to retrieve, update, add, and delete records in an existing data set. When you specify sequential as the mode of access, VSAM uses the index to access data records in ascending or descending sequence by key. When retrieving records, you do not need to specify key values because VSAM automatically obtains the next logical record in sequence.

Sequential processing can be started anywhere within the data set. While positioning is not always required (for example, the first use of a data set starts with the first record), it is best to specify positioning using one of the following methods:
  • Use the POINT macro.
  • Issue a direct request with note string positioning (NSP), and change the request parameter list with the MODCB macro from "direct" to "sequential" or "skip sequential".
  • Use MODCB to change the request parameter list to last record (LRD), backward (BWD), and direct NSP; then change the RPL to SEQ, BWD, and SEQ.

Sequential access enables you to avoid searching the index more than once. Sequential is faster than direct for accessing multiple data records in ascending key order.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014