Use this when you need to calculate the SPACE= and BLKSIZE= parameters in JCL for a new dataset. Use the defaults as a starting point and adjust the values such as the Record Length (LRECL) and Record Format (RECFM) as needed.
How to use it
Device defaults to 3390 (what almost every system uses today).
SPACE & BLKSIZE calculator
Using 27,920 bytes (half-track)
Recommended BLKSIZE
27,920
Blocking factor
349 records/block
Blocks / track
2
Estimated file size (data)
781.3 KB (800,000 B)
Estimated allocated size
954.3 KB (977,200 B)
Records / track
698
Records / cylinder
10,470
Total blocks (w/ growth)
35
Estimated tracks
18
Estimated cylinders
2
Primary / secondary (TRK)
18 / 5
//NEWDD DD DSN=USER.SEQ.DATA,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(18,5),RLSE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920),
// DSORG=PSSPACE=(TRK,(18,5),RLSE) · DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920)
How the numbers are built
Optimal BLKSIZE is half-track (27,998 bytes on 3390). For FB that means the largest multiple of LRECL that still fits. Tracks assume 15 tracks per cylinder and about 55,998 usable bytes per track. Primary SPACE is the first extent(s); each secondary grab usually adds another. Too many extents slow things down or land you in B37/D37. SMS, keys, extended format, and compression can change what you actually get. Use this to plan, then confirm on your system.
Need this at work?
Free account saves tutorial progress. The jobs board lists openings that ask for JCL.
If the job fails after you paste the DD, open JESYSMSG first. Look for IEC0xxI / IEC141I / IEF257I lines, then the matching system abend (SB37, SD37, SE37, S013). The job log usually prints only the short message ID line; the longer English explanation lives in the IBM manuals (and in ISPF / SDSF message help if your shop has it). Below: a typical log line, then IBM's meaning for the common return code.
Raise primary/secondary, move to a freer volume, or allow more volumes. IBM associates return code 04 with end-of-volume when output space is gone.
12345678910IEC030I B37-04,IFG0554A,PAYROLL,STEP10,OUTDD,128C,TSO001,0427041D,USER.PAY.OUT IEF450I PAYROLL STEP10 - ABEND=SB37 U0000 REASON=00000004 IBM explanation (IEC030I, rc 04): The error occurred during end-of-volume. For an output data set, all space was used on the current volume and no more volumes were specified. On DASD this also covers: no more space on the volume, maximum extents reached (16 for basic-format / PDS; 123 for extended format / PDSE), maximum tracks per volume reached, or VTOC full.
Classic cause: SPACE=(TRK,10) with no second number. Add a secondary quantity or size primary to cover the whole file.
12345678IEC031I D37-04,IFG0554P,PAYROLL,STEP10,OUTDD,3390,TSO001,USER.PAY.OUT IEF450I PAYROLL STEP10 - ABEND=SD37 U0000 REASON=00000004 IBM explanation (IEC031I, rc 04): A data set opened for output used all the primary space, and no secondary space was requested. Change the JCL specifying a larger primary quantity or add a secondary quantity to the SPACE parameter on the DD statement.
Size primary larger, add volumes, or recreate the PDS with more directory blocks if the directory is what filled.
12345678IEC032I E37-04,IFG0554A,PAYROLL,STEP10,OUTDD,3390,TSO001,USER.PAY.PDS IEF450I PAYROLL STEP10 - ABEND=SE37 U0000 REASON=00000004 IBM explanation (IEC032I, rc 04): A data set opened for output used all space available to or on the current volume, and no more volumes were available. Common cases: not enough volumes on the DD; a PDS/VIO data set filled its single volume; or a PDS already used 16 extents.
Fix the DCB, or leave BLKSIZE off / code BLKSIZE=0 on a new disk data set so the system can pick a valid block size.
12345678910111213IEC141I 013-20,IGG0191A,PAYROLL,STEP10,OUTDD,USER.PAY.OUT IEF450I PAYROLL STEP10 - ABEND=S013 U0000 REASON=00000014 * Bad example: RECFM=FB,LRECL=133,BLKSIZE=800 (800 is not a multiple of 133) IBM explanation (IEC141I 013-20): An OPEN was issued for a sequential data set using queued access. BLKSIZE is not a multiple of LRECL, or LRECL is 0 with RECFM=FB/FBS, or BLKSIZE is not at least four bytes greater than LRECL with RECFM=V. IBM explanation (IEC141I 013-34, related DCB clash): RECFM=V/VB with LRECL greater than BLKSIZE-4, or non-variable RECFM with LRECL greater than BLKSIZE, or BLKSIZE/LRECL unavailable so OPEN could not build buffers.
These often show up before the step really runs. Fix the syntax or ask for space the volume can actually give (CONTIG fails when no single solid chunk exists).
123456789101112131415161718IEFC621I EXPECTED CONTINUATION NOT RECEIVED IEFC630I UNIDENTIFIED KEYWORD IN THE SPACE FIELD IEF257I PAYROLL STEP10 OUTDD - SPACE REQUESTED NOT AVAILABLE IEF453I PAYROLL - JOB FAILED - JCL ERROR IBM explanation (IEF257I): In a DD statement, the SPACE parameter requested more tracks than were available on the requested direct access volume. Check the SPACE quantity; if it is valid, change the request to a different volume, then submit again. IBM explanation (IEFC621I): A continuation was expected (trailing comma on the previous JCL line) but the next line was missing or did not start in columns 1-16. IBM explanation (IEFC630I): A keyword on the JCL statement was not recognized (misspelled, misplaced equal sign, or a subparameter without its major keyword).
You still get B37/D37/E37 and the same IBM text, but the real file was bigger than the estimate (wrong record count, or VB records longer than assumed). Bump growth %, raise primary, fix the count, then rerun. Use RLSE after you know the real size, not instead of enough primary.
12345IEC030I B37-04,IFG0554A,PAYROLL,STEP10,OUTDD,3390,TSO001,USER.PAY.OUT IEF450I PAYROLL STEP10 - ABEND=SB37 U0000 REASON=00000004 Same IEC030I meaning as above. Before blaming the volume, re-check record count, average VB length, and the growth % you used in this tool.
Explanations above summarize IBM z/OS 3.1.0 message docs for IEC030I, IEC031I, IEC032I, IEC141I, IEF257I, IEFC621I, and IEFC630I. More on extents, RLSE, and recovery is in the SPACE allocation tutorial.
A track is a shelf. A block is a box on that shelf. LRECL is how big one item is. BLKSIZE is how many items fit in one box. SPACE is how many shelves you reserve when you create the file.
Under SMS you can code BLKSIZE=0 and let the system pick. This page shows the number it usually lands on so you can size SPACE with eyes open.
The SPACE allocation tutorial covers RLSE, CONTIG, ROUND, extents, and B37/D37. Other calculators live on /tools.