Before the era of digital editors and IDEs, mainframe programmers used physical coding sheets to write their JCL. These paper forms were designed with columns that aligned with punched card requirements, which were the primary input medium for early mainframe systems.
1. Punched Cards Era (1960s-1970s)
2. Terminal Entry Era (1970s-1980s)
3. Modern Era (1990s-Present)
Despite the shift to digital environments, understanding the traditional JCL coding sheet layout remains important, as it explains many of JCL's formatting rules and constraints.
JCL's strict formatting rules derive from the 80-column punched card format. Each column has a specific purpose:
Columns | Purpose | Requirements |
---|---|---|
1-2 | Identifier Field | Must contain // for JCL statements or //* for comments |
3-10 | Name Field | Contains jobname, stepname, or ddname (or blank for continuation) |
11 | Blank Field | Must be a blank space (separates name from operation) |
12-71 | Operation/Operand Field | Contains operation (JOB, EXEC, DD) and parameters |
72 | Continuation Column | Any non-blank character indicates continuation to next line |
73-80 | Sequence Numbers | Originally used for card deck sequencing, mostly ignored now |
|....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 //JOBNAME JOB (ACCT),'NAME',CLASS=A,MSGCLASS=X 00000100 //STEP1 EXEC PGM=PROGRAM 00000200 //DD1 DD DSN=MY.DATASET,DISP=SHR 00000300
The ruler above the JCL statements shows column positions. Note how each field aligns to specific columns.
When JCL statements are too long to fit in a single line (columns 1-71), they need to be continued on the next line. This is indicated by a continuation character in column 72.
123//STEP1 EXEC PGM=MYPROG,REGION=4M, X // PARM='OPTION1,OPTION2, X // OPTION3,OPTION4'
Notice the 'X' in column 72 (not visible in all editors) and how the continuation lines have blank name fields.
JCL statements are identified by their format and content in specific columns:
12345678//* THIS IS A COMMENT STATEMENT //MYJOB JOB (ACCT),'JOHN DOE',CLASS=A JOB STATEMENT //* ANOTHER COMMENT //STEP1 EXEC PGM=IEFBR14 EXEC STATEMENT //DD1 DD DISP=(NEW,CATLG), DD STATEMENT // DSN=MY.DATASET, // SPACE=(TRK,(1,1)) // NULL STATEMENT
Each statement type has distinct identification characteristics based on its position and content.
Although modern JCL editors don't strictly enforce column positioning, following these formatting best practices improves readability and maintainability:
1234567891011121314151617181920212223242526272829303132//********************************************* //* * //* MONTHLY SALES REPORT JOB * //* RUNS ON THE LAST DAY OF EACH MONTH * //* * //********************************************* //SALES JOB (ACCT#),'SALES DEPT', // CLASS=A, // MSGCLASS=X, // NOTIFY=&SYSUID //* //*--- STEP 1: EXTRACT SALES DATA ---* //EXTRACT EXEC PGM=SALESEXT, // REGION=4M, // TIME=5 //* //SALESIN DD DSN=PROD.SALES.CURRENT, // DISP=SHR //SALESOUT DD DSN=WORK.SALES.EXTRACT, // DISP=(NEW,PASS,DELETE), // SPACE=(CYL,(10,5),RLSE), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920) //* //*--- STEP 2: GENERATE REPORTS ---* //REPORT EXEC PGM=SALESRPT, // COND=(0,LT,EXTRACT) //* //SALDATA DD DSN=WORK.SALES.EXTRACT, // DISP=(OLD,DELETE,DELETE) //RPTOUT DD SYSOUT=A, // DCB=(RECFM=FBA,LRECL=133,BLKSIZE=27930) //*
This example demonstrates good alignment, logical grouping with comments, consistent indentation, and descriptive naming.