Skip to content
systemcoding.dev
Mainframe

Define an ESDS with the NONINDEXED parameter

Define an entry-sequenced VSAM dataset with the NONINDEXED parameter, for append-only logs read in the order written.

1 min read
Summarize in AI

An ESDS stores records in the order they are written and has no key. IDCAMS names it NONINDEXED.

jcl
  DEFINE CLUSTER (NAME(USER1.EVENT.ESDS) -
         NONINDEXED -
         RECORDSIZE(100 100) -
         CYLINDERS(2 1))
Text
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0

Records are located by the relative byte address (RBA) of the first byte, which is a position in the file and not a record number. A new record is always added at the end, and you cannot delete one or make it longer in place.

An ESDS needs no index, so there is only a data component. Use it for a journal or an event log, and add an alternate index when you also need to find records by a field. It cannot shrink: the space of a record that you logically delete is not reused, and the way to reclaim it is to copy the file with REPRO into a new cluster.

Taggedjclvsam
Share

More snippets

Get new posts by email

We send one email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.