Fill in the cluster type, name, record size, key (for KSDS), and space. You get DEFINE CLUSTER control cards, optional DELETE for recreate jobs, and a minimal IDCAMS JCL wrapper you can paste into your shop after changing CLASS, MSGCLASS, and account.
How to use it
Runs in your browser. Nothing is uploaded.
IDCAMS DEFINE CLUSTER generator
Check these
KSDS → INDEXED · full JCL
//IDCDEF JOB (ACCT),'DEFINE CLUSTER',CLASS=A,MSGCLASS=X
//*
//* Generated by MainframeMaster IDCAMS DEFINE CLUSTER tool
//* Change CLASS/MSGCLASS/ACCT for your shop. Review VOLUMES for SMS.
//*
//STEP010 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE USER.DEMO.KSDS CLUSTER PURGE
IF LASTCC = 8 THEN SET MAXCC = 0
DEFINE CLUSTER ( -
NAME(USER.DEMO.KSDS) -
INDEXED -
RECORDSIZE(80 80) -
KEYS(10 0) -
FREESPACE(20 10) -
CYLINDERS(5 1) -
SHAREOPTIONS(2 3) -
NOREUSE) -
DATA (NAME(USER.DEMO.KSDS.DATA)) -
INDEX (NAME(USER.DEMO.KSDS.INDEX))
/*Need this at work?
Free account saves tutorial progress. The jobs board lists openings that ask for JCL.
SHAREOPTIONS(cross-region cross-system) controls who can open the cluster at the same time, and whether VSAM keeps buffers honest when more than one user is in. You code two numbers. The first is sharing inside one z/OS image (multiple jobs, CICS regions, TSO users). The second is sharing across systems in a sysplex (or loosely coupled systems that share the DASD).
This tool offers the usual presets. Match whatever your shop already uses on similar files; wrong share options show up as open failures, stale reads, or overlayed updates.
FREESPACE(ci-percent ca-percent) reserves empty room when VSAM loads or splits space, so later inserts do not split as often. It matters on KSDS and RRDS. ESDS mostly appends, so this generator skips FREESPACE for ESDS.
A control interval (CI) is the unit VSAM reads and writes (often 4K or so). The CI percent is how much of each CI to leave empty when the file is loaded. Example: FREESPACE(20 10) leaves about 20% of every CI free. Inserts that land in that CI can use the hole instead of forcing a CI split right away.
Higher CI free space means fewer splits during random inserts, and fewer records packed per CI, so sequential reads do more I/O. Low or zero CI free space packs tight; fine for load-once / read-mostly files, painful if you insert into the middle of a KSDS all day.
A control area (CA) is a group of CIs (often a cylinder's worth). The CA percent is how many CIs in each CA to leave completely empty at load. With FREESPACE(20 10), about 10% of the CIs in each CA stay empty. Those empty CIs absorb growth before VSAM has to split a whole CA (a much bigger, slower event than a CI split).
Typical starter values sit around 10–30 for CI and a bit lower for CA (for example 20 10 or 15 5). Tune from LISTCAT split counts after the file has real traffic. Empty FREESPACE(0 0) is normal for files you load sorted and almost never insert into.
12345678910111213141516171819//IDCDEF JOB (ACCT),'DEFINE CLUSTER',CLASS=A,MSGCLASS=X //* //STEP010 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DELETE USER.DEMO.KSDS CLUSTER PURGE IF LASTCC = 8 THEN SET MAXCC = 0 DEFINE CLUSTER ( - NAME(USER.DEMO.KSDS) - INDEXED - RECORDSIZE(80 80) - KEYS(10 0) - FREESPACE(20 10) - CYLINDERS(5 1) - SHAREOPTIONS(2 3) - NOREUSE) - DATA (NAME(USER.DEMO.KSDS.DATA)) - INDEX (NAME(USER.DEMO.KSDS.INDEX)) /*
DEFINE CLUSTER is ordering a new filing cabinet. You say whether it has keys (KSDS), just stacked papers (ESDS), or numbered drawers (RRDS), how big each folder is, how much shelf space you want, and what to call it. The system finds disk space, writes the name in the catalog, and then programs can open that name.
Full syntax, parameters, and KSDS/ESDS/RRDS examples.
DEFINE, DELETE, REPRO, LISTCAT, and basic IDCAMS JCL.
How the cluster relates to DATA and INDEX components.
Size non-VSAM sequential and PDS space (different from VSAM CYLINDERS).
The DEFINE CLUSTER tutorial walks every parameter with examples. IDCAMS job structure is in the IDCAMS utility page. Other calculators live on /tools.