VSAM TRACKS (Space Allocation)

The TRACKS parameter in DEFINE CLUSTER specifies how much space to allocate for a VSAM cluster (or for its data or index component) in tracks. You give a primary quantity (initial allocation in tracks) and an optional secondary quantity (tracks added per extension). A track is a single physical track on DASD—on a 3390 it is about 56 KB. TRACKS gives you finer granularity than CYLINDERS (one cylinder is 15 tracks on a 3390), so it is often used for smaller datasets or for the index component of a KSDS. This page explains TRACKS(primary secondary), where you can specify it, how it compares to CYLINDERS and RECORDS, and when to choose TRACKS.

What TRACKS Does

TRACKS(primary [secondary]) tells the system to allocate space in track units. Primary is the number of tracks allocated when the cluster is first created. When the dataset needs more space, the system requests an extension of secondary tracks (if you specified secondary). So primary is the initial size in tracks, and secondary is the size of each extension in tracks. If you omit secondary, the behavior is system-dependent (e.g. no extension or a default). TRACKS is an alternative to CYLINDERS and RECORDS; you use exactly one of these space units for a given component.

Syntax and Where to Specify It

You can specify TRACKS at the cluster level or in the DATA and INDEX subparameters, just like CYLINDERS. At the cluster level, the value applies to the whole cluster. For a KSDS it is common to specify space in DATA and INDEX separately: for example TRACKS for the index (small) and CYLINDERS for the data (large), or TRACKS for both if both are small.

Where to specify TRACKS
LevelEffect
Cluster levelTRACKS(primary secondary) after the cluster name applies to the whole cluster. For a KSDS the system splits space between data and index; for ESDS/RRDS it is all for the data component.
DATAIn DATA(NAME(...) TRACKS(primary secondary)). Allocates the data component in tracks. Use when the data component is small or you want track-level control.
INDEXIn INDEX(NAME(...) TRACKS(primary secondary)). Allocates the index component in tracks. Common for KSDS index, which is usually small (e.g. tens of tracks).

TRACKS vs CYLINDERS vs RECORDS

TRACKS allocates in track units. CYLINDERS allocates in cylinder units (each cylinder is multiple tracks). RECORDS(primary secondary) specifies an estimated number of records; the system converts to tracks or cylinders using record size and control interval size. The following table summarizes when each is used.

Space units comparison
ParameterTypical size (3390)When to use
TRACKS~56 KB per track (3390)Small datasets, index components, fine granularity.
CYLINDERS~850 KB per cylinder (3390, 15 tracks)Large datasets, simpler allocation.
RECORDSConverted from record count and RECORDSIZE/CISZWhen you think in number of records.

For a small index component, TRACKS(30 15) might allocate 30 tracks initially and 15 per extension—enough for many KSDS indexes without wasting a full cylinder. For a large data component, CYLINDERS(100 50) is easier to reason about and avoids large track counts.

Track and Cylinder Size on 3390

On IBM 3390 DASD, one track holds 56,664 bytes (about 56 KB). One cylinder consists of 15 tracks, so one cylinder is about 850 KB. When you specify TRACKS(15 15), you are allocating roughly one cylinder worth of space (15 tracks) for primary and again for each secondary extension. So TRACKS and CYLINDERS are related by the device geometry; choose the unit that matches how you think about the dataset size (tracks for small or precise, cylinders for large).

Example: Cluster with TRACKS

jcl
1
2
3
4
5
6
7
8
9
DEFINE CLUSTER ( - NAME(MY.SMALL.KSDS) - INDEXED - RECORDSIZE(80 80) - KEYS(8 0) - TRACKS(50 25)) - DATA (NAME(MY.SMALL.KSDS.DATA)) - INDEX (NAME(MY.SMALL.KSDS.INDEX))

This allocates 50 tracks primary and 25 tracks secondary for the whole cluster. The system divides the space between the data and index components. For more control, specify TRACKS (or CYLINDERS) in DATA and INDEX separately.

Example: INDEX in TRACKS, DATA in CYLINDERS

jcl
1
2
3
4
5
6
7
8
DEFINE CLUSTER ( - NAME(MY.APPL.KSDS) - INDEXED - RECORDSIZE(200 500) - KEYS(12 0)) - DATA (NAME(MY.APPL.KSDS.DATA) CYLINDERS(50 25)) - INDEX (NAME(MY.APPL.KSDS.INDEX) TRACKS(40 20))

The data component is allocated in cylinders (50 primary, 25 secondary)—suitable for a large data component. The index component is allocated in tracks (40 primary, 20 secondary)—enough for the index without allocating whole cylinders. This mix is common when the index is small relative to the data.

Primary and Secondary

Primary should reflect how much space you need at creation (or after initial load). Secondary should be large enough to limit the number of extensions (each extension has overhead and may fragment allocation) but not so large that you reserve unused space. For TRACKS, typical values might be in the tens or low hundreds for small components; for large components you might use CYLINDERS instead.

Key Takeaways

  • TRACKS(primary secondary) allocates space in tracks. Primary is initial allocation; secondary is tracks per extension.
  • Use TRACKS for smaller datasets or for the index component when cylinder allocation would over-allocate.
  • On a 3390, one track is ~56 KB; one cylinder is 15 tracks (~850 KB). TRACKS(15 15) ≈ one cylinder.
  • You can specify TRACKS at cluster level or in DATA and INDEX separately. Mix TRACKS and CYLINDERS (e.g. TRACKS for index, CYLINDERS for data) when appropriate.

Explain Like I'm Five

Imagine a parking lot. A track is one row of spaces. A cylinder is a whole section of rows (like 15 rows). TRACKS is like saying "give me 20 rows to start, and when I need more, add 10 rows." That is good when you only need a few rows (a small file or the index). CYLINDERS is like saying "give me 5 whole sections"—better when you need a lot of space (the big data file).

Test Your Knowledge

Test Your Knowledge

1. What does TRACKS(20 10) mean?

  • 20 cylinders, 10 tracks
  • 20 tracks primary, 10 tracks secondary
  • 20 records, 10 tracks
  • 20 tracks total

2. Why use TRACKS instead of CYLINDERS for a small index?

  • TRACKS is required for INDEX
  • CYLINDERS might over-allocate (one cylinder = many tracks)
  • TRACKS is faster
  • CYLINDERS does not work for INDEX

3. Roughly how many tracks are in one 3390 cylinder?

  • 1
  • 10
  • 15
  • 56
Published
Updated
Read time5 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: IBM z/OS DFSMS documentationSources: IBM DFSMS Access Method Services, z/OS VSAM documentationApplies to: z/OS 2.5