Mainframe
Documentation

Version Latest

VSAM clusters on z/OS

Listing VSAM clusters with their components, LISTCAT details, reading and saving KSDS records through a copybook, and defining, loading, copying, verifying, printing and deleting clusters with IDCAMS batch jobs.

Verification state: modelled, not yet run against IDCAMS on z/OS. The LISTCAT reader is checked on AWS CardDemo's real LISTCAT.txt (all 10 clusters), and the jobs' IDCAMS control statements are read back by the module's own IDCAMS reader. How z/OSMF lists VSAM entries is taken from Zowe Explorer. The verification kit defines, loads, lists, reads, updates, prints and deletes a scratch KSDS, and cleans up after itself.

As ISPF 3.4 and IBM File Manager do, the module drives IDCAMS. Every action runs as an ordinary IDCAMS batch job through the z/OSMF jobs interface (not z/OSMF's AMS endpoint), so it leaves an audit trail on the spool. IDCAMS messages (IDC codes) land in Problems.

Clusters in the z/OS Data Sets view

Each cluster is listed once, with its data and index components below it, instead of three unrelated entries.

Look at a cluster

  • Show VSAM Cluster Details runs LISTCAT ENTRIES ALL and shows organisation, key, record sizes, CI sizes, SHAREOPTIONS, statistics, HI-U-RBA, SMS classes and volumes.
  • Open VSAM Records reads the cluster by REPRO into a work data set and opens it in the Record Viewer with a copybook. A cluster above neuralInverse.mainframe.largeDownloadMegabytes asks first.
  • Print VSAM Records... runs IDCAMS PRINT.

Save a KSDS

When you save records of a KSDS opened with Open VSAM Records:

  1. You confirm, and the confirmation names the cluster and the system.
  2. The cluster's statistics are checked: if they changed since you read it, the save stops.
  3. A backup copy is made with REPRO and kept.
  4. Only if the backup ends with condition code 0 does REPRO REPLACE write your records.

Deleted records need a REUSE cluster. ESDS, RRDS, protected clusters and partial reads open read-only, with the reason.

Define, load, copy, verify, delete

CommandIDCAMS
Define VSAM Cluster...DEFINE CLUSTER, with the record size and key taken from a copybook
Load VSAM Cluster with REPRO...REPRO from a sequential data set into the cluster
Copy VSAM Cluster to Data Set with REPRO...REPRO from the cluster to a sequential data set
Verify VSAM ClusterVERIFY
Delete VSAM ClusterDELETE, with PURGE if you choose it

Every change is confirmed naming the cluster and the system, and refused before any job for a cluster matching neuralInverse.mainframe.readOnlyDatasets.

Settings

SettingMeaning
neuralInverse.mainframe.idcams.jobCardThe JOB statement of the IDCAMS jobs
neuralInverse.mainframe.idcams.workQualifierThe qualifier of the work data sets REPRO reads into

VSAM clusters on the workstation, defined and read by local IDCAMS steps with GnuCOBOL, are on Run JCL with GnuCOBOL.

Last reviewed 18 October 2026View as Markdown

VSAM clusters on z/OS · Docs · Neural Inverse