Choose a task, fill in the names and attributes, and copy the job. The generator writes JOB, EXEC, and DD statements for IEFBR14, IEBGENER, IEBCOPY, IEBPTPCH, DFSORT, IDCAMS, SuperC, and IKJEFT01. Each job is also checked with the JCL checker, and any findings appear above the output.
How to use it
Choose a template at the top of the tool.
Enter the job name, account, CLASS, and MSGCLASS that your site requires.
Enter the data set names, member list, or commands. Fields that a template does not use stay hidden.
Read the notes, then copy the JCL and replace any site-specific values.
Runs in your browser. Nothing is uploaded.
JCL generator
Before you submit
IEFBR14 does no work of its own. The DD statement allocates the data set when the step runs.
DISP=(NEW,CATLG,DELETE) fails if the data set already exists. Check the name first.
Checked with the JCL checker: 0 errors and 0 warnings.
Replace CLASS, MSGCLASS, and the account for your site before you run the job.
//ALLOCDS JOB (ACCT),'ALLOCATE A DATA SET',CLASS=A,MSGCLASS=X//*//* Generated by MainframeMaster. Check CLASS, MSGCLASS, and the account.//*//STEP010 EXECPGM=IEFBR14//NEWDS DDDSN=USER.DEMO.NEWDATA,DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,X// SPACE=(CYL,(5,1)),DCB=(RECFM=FB,LRECL=80,BLKSIZE=6000)
Need this at work?
Free account saves tutorial progress. The jobs board lists openings that ask for JCL.
Allocate: an IEFBR14 step with a NEW DD statement. The system creates the data set and catalogs it. Choose PO to create an empty partitioned data set (PDS) with directory blocks.
Copy a sequential file: an IEBGENER step. The output can be a new disk data set, an existing data set (DISP=OLD), or a tape data set with UNIT and an optional volume serial. SYSIN is DUMMY.
Delete with IEFBR14: DISP=(MOD,DELETE,DELETE). MOD lets the step complete when the data set is not there. This does not delete a VSAM cluster.
Sort: a DFSORT step with SORTIN, SORTOUT, three work files, and one SORT FIELDS control statement.
Copy library members: an IEBCOPY step. The output can be a new library or one that already exists. A member list becomes SELECT statements. SYSUT3 and SYSUT4 are the spill data sets from the IBM samples.
Compress a library: IEBCOPY with the same library on INDD and OUTDD, and DISP=OLD, so the step has the library to itself.
Delete with IDCAMS: DELETE for a CLUSTER or a NONVSAM entry. Optional IF LASTCC = 8 so a missing entry does not fail the job.
Run a program: EXEC PGM= with an optional PARM, STEPLIB, and SYSPRINT. You add the other DD statements the program needs.
Run TSO or REXX: IKJEFT01 with SYSTSPRT, an optional SYSEXEC library, and your commands under SYSTSIN. REGION and DYNAMNBR follow the IBM background-exec sample.
Print: IEBPTPCH for a sequential data set or a library, or IDCAMS PRINT CHARACTER for VSAM. An optional limit becomes STOPAFT or COUNT.
List a catalog entry: LISTCAT ENTRIES(name) ALL.
Copy with REPRO: IDCAMS copies sequential data, a library, or a VSAM cluster by data set name. REPLACE is optional and applies to a reusable cluster.
Define a GDG: DEFINE GENERATIONDATAGROUP with LIMIT, EMPTY or NOEMPTY, and SCRATCH or NOSCRATCH. EXTENDED allows a limit up to 999.
Allocate a generation: an IEFBR14 step for base(+1). The GDG base must already exist.
Compare: ISRSUPC with NEWDD, OLDDD, and OUTDD. An optional column range is written as CMPCOLM.
Why the allocate and delete templates use IEFBR14
IEFBR14 is a program that does nothing. It exists so that a step can carry DD statements, and the system allocates or deletes the data sets they name. Shops use it for allocation and deletion because the step needs no input and no control statements.
Record attributes and BLKSIZE
For a new data set, the generator requires BLKSIZE and checks it against LRECL. Fixed-length records (F and FB) need BLKSIZE to be a multiple of LRECL. Variable-length records (V and VB) need BLKSIZE of at least LRECL plus 4. For a copy or sort output, LRECL and BLKSIZE are optional. Leave them blank to let the utility supply the attributes.
What the generator does not cover
IEBCOPY unload to tape, load-module aliases, and EXCLUDE lists. The copy template writes one COPY and, when you name members, SELECT.
Defining a VSAM cluster. Use the IDCAMS DEFINE CLUSTER generator for that. This page only deletes an entry.
Procedures, symbolic parameters, and IF and ELSE logic. A GDG base and one new generation are covered. SMS storage classes and model DSCBs are not.
Checks against your catalog, storage classes, or SMS data classes. Your site may need a different UNIT or SPACE, or no SPACE at all when a data class supplies it.
Explain it like I'm 5
A JCL job is a list of instructions for the mainframe. This tool fills in the common ones. Allocating a data set is like reserving an empty box with a label on it. Copying is like asking a helper to pour one box into another. Deleting is throwing the box away. Sorting is putting the lines in order. Check the labels and the sizes before you start the job.