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


Processing VSAM Data Sets

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

To process VSAM data sets, you use VSAM macros. You can use the following procedure for processing a VSAM data set to read, update, add, or delete data:

  1. Create an access method control block to identify the data set to be opened using the ACB or GENCB macro.
  2. Create an exit list to specify the optional exit routines that you supply, using the EXLST or GENCB macro.
  3. Optionally, create a resource pool, using the BLDVRP macro. (See Sharing Resources Among VSAM Data Sets.)
  4. Connect your program to the data set you want to process, using the OPEN macro.
  5. Create a request parameter list to define your request for access, using the RPL or GENCB macro.
  6. Manipulate the control block contents using the GENCB, TESTCB, MODCB and SHOWCB macros.
  7. Request access to the data set, using one or more of the VSAM request macros (GET, PUT, POINT, ERASE, CHECK, and ENDREQ).
  8. Disconnect your program from the data set, using the CLOSE macro.

The virtual resource pool for all components of the clusters or alternate indexes must be successfully built before any open is issued to use the resource pool; otherwise, the results might be unpredictable or performance problems might occur.

For information about the syntax of each macro, and for coded examples of the macros, see z/OS DFSMS Macro Instructions for Data Sets.

The ACB, RPL, and EXLST are created by the caller of VSAM. When storage is obtained for these blocks, virtual storage management assigns the PSW key of the requestor to the subpool storage. An authorized task can change its PSW key. Since VSAM record management runs in the protect key of its caller, such a change might make previously acquired control blocks unusable because the storage key of the subpool containing these control blocks no longer matches the VSAM caller's key.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014