Introduction to VSAM programming

You use the virtual storage access method (VSAM) to organize data and maintain information about that data in a catalog. Perform VSAM programming using access method services commands and VSAM macros.
  • Access method services. You define VSAM data sets and establish catalogs using a multi-function services program called access method services.
  • Job control language. You can define VSAM data sets using JCL.
  • Dynamic allocation. You can define or allocate to data sets using dynamic allocation, which is SVC 99. Dynamic allocation is described in z/OS MVS Programming: Authorized Assembler Services Guide. VSAM supports the nocapture option of dynamic allocation. It reduces overhead of dynamic allocation and reduces virtual storage usage below the 16 MB line.
  • VSAM macro instructions. Two types of VSAM macros are used to process VSAM data sets:
    • Control block macros generate control blocks of information needed by VSAM to process the data set.
    • Request macros are used to retrieve, update, delete, or insert logical records.

All macros described in this book are in the main system macro library, SYS1.MACLIB.

You can use 24-bit or 31-bit addressing mode for VSAM programs. If you use 31-bit support, see z/OS DFSMS Using Data Sets for procedures and restrictions.