Appendix C: JCL Quick Reference
Job Control Language (JCL) is the interface between your COBOL programs and the z/OS operating system. No matter how elegant your COBOL code, it does nothing until JCL tells the system how to compile it, what files to connect, and where to send the output. This appendix provides a compact reference for the JCL constructs used throughout this textbook.
Every JCL statement begins in column 1 with // (except for /* delimiter statements and //* comment statements). Statement names occupy columns 3-10 and must start with a letter or national character. Parameters follow the operation field, separated by commas with no embedded spaces. Continuation is indicated by coding a parameter through at least column 72, then coding // in columns 1-2 of the next line with the continuation starting in column 16.
C.1 JOB Statement
The JOB statement identifies the beginning of a job and specifies job-level parameters.
//jobname JOB (account-info),'programmer-name',
// CLASS=jobclass,
// MSGCLASS=output-class,
// MSGLEVEL=(statements,messages),
// REGION=value,
// TIME=(minutes,seconds),
// NOTIFY=&SYSUID,
// TYPRUN={SCAN|HOLD|COPY},
// COND=(code,operator),
// RESTART=stepname
C.1.1 Key JOB Parameters
| Parameter | Purpose | Common Values |
|---|---|---|
CLASS |
Job class — determines execution priority and resource allocation | A-Z, 0-9 (installation-defined) |
MSGCLASS |
Output class for job log | A = print, X = held output, H = hold |
MSGLEVEL |
Controls JCL and allocation messages | (1,1) = all JCL + all messages (use during development) |
REGION |
Memory allocation | 0M = unlimited (up to system max); 64M, 256M typical |
TIME |
CPU time limit | (5,0) = 5 minutes; NOLIMIT = no limit |
NOTIFY |
User to receive completion message | &SYSUID = the submitting user |
TYPRUN=SCAN |
Syntax-check JCL without executing | Use before first submission of new JCL |
COND |
Job-level condition code testing | (4,LT) = cancel if any step returns RC < 4 |
RESTART |
Restart from a specific step | Step name or stepname.procstep |
Example — Development job:
//DEVJOB01 JOB (ACCT123),'J.SMITH',
// CLASS=A,MSGCLASS=X,
// MSGLEVEL=(1,1),
// REGION=0M,TIME=(5,0),
// NOTIFY=&SYSUID
Example — Production job:
//PRDJOB01 JOB (PROD456),'BATCH-NIGHTLY',
// CLASS=P,MSGCLASS=A,
// MSGLEVEL=(1,1),
// REGION=256M,TIME=(30,0),
// NOTIFY=OPSUSER1
C.2 EXEC Statement
The EXEC statement identifies a program to execute or a procedure to invoke.
//stepname EXEC PGM=program-name,
// PARM='parameter-string',
// COND=(code,operator[,stepname]),
// REGION=value,
// TIME=(minutes,seconds)
//stepname EXEC PROC=procedure-name (or just: EXEC procedure-name)
// symbolic-parm=value,...
C.2.1 Key EXEC Parameters
| Parameter | Purpose | Example |
|---|---|---|
PGM |
Program to execute | PGM=COBPROG1 |
PROC |
Cataloged or in-stream procedure | PROC=IGYWCLG |
PARM |
Parameters passed to program | PARM='REPORT,2026' |
COND |
Step-level condition testing | COND=(4,LT,STEP01) |
REGION |
Override job-level REGION | REGION=128M |
TIME |
Override job-level TIME | TIME=(10,0) |
PARM conventions: The PARM string is passed to the program in a standard parameter list. In COBOL, you receive it via:
PROCEDURE DIVISION USING WS-PARM-DATA.
...
LINKAGE SECTION.
01 WS-PARM-DATA.
05 WS-PARM-LENGTH PIC S9(4) COMP.
05 WS-PARM-STRING PIC X(100).
The first two bytes are a halfword length field, followed by the parameter text. Maximum length is 100 characters.
C.3 DD Statement
The DD (Data Definition) statement describes a data set and connects it to a file name in your program.
//ddname DD DSN=data-set-name,
// DISP=(status,normal-disposition,abnormal-disposition),
// SPACE=(unit,(primary,secondary,directory)),
// DCB=(RECFM=format,LRECL=length,BLKSIZE=size),
// UNIT=unit-type,
// VOL=SER=volume-serial,
// SYSOUT=class
C.3.1 DSN (Data Set Name)
- Maximum 44 characters, organized in qualifiers separated by periods.
- Each qualifier: 1-8 characters, starts with a letter or national character.
- Temporary data sets:
&&tempnameorDSN=&&TEMPFILE. - Generation data groups:
DSN=MY.GDG.BASE(+1)for new,(0)for current,(-1)for previous. - PDS members:
DSN=MY.PDS.LIBRARY(MEMBER1).
C.3.2 DISP (Disposition)
DISP=(status,normal-disp,abnormal-disp)
Status (initial):
| Value | Meaning |
|---|---|
NEW |
Create a new data set |
OLD |
Exclusive access to existing data set |
SHR |
Shared access to existing data set |
MOD |
Append to existing or create new |
Normal and Abnormal Disposition:
| Value | Meaning |
|---|---|
KEEP |
Retain the data set |
DELETE |
Delete the data set |
CATLG |
Catalog the data set (keep + catalog entry) |
UNCATLG |
Uncatalog but keep on volume |
PASS |
Pass to subsequent steps (temporary) |
Common DISP combinations:
| Pattern | Use Case |
|---|---|
DISP=(NEW,CATLG,DELETE) |
Create new permanent data set; delete if step fails |
DISP=SHR |
Read an existing shared data set (shorthand for (SHR,KEEP,KEEP)) |
DISP=OLD |
Exclusive read/write on existing data set |
DISP=(MOD,CATLG) |
Append to existing or create if not found |
DISP=(NEW,PASS) |
Create temporary data set, pass to next step |
DISP=(OLD,DELETE) |
Delete after processing |
C.3.3 SPACE
SPACE=(unit,(primary,secondary,directory),RLSE)
| Unit | Meaning | Example |
|---|---|---|
TRK |
Tracks | SPACE=(TRK,(50,10)) |
CYL |
Cylinders | SPACE=(CYL,(5,1)) |
blksize |
Block size in bytes | SPACE=(27920,(100,20)) |
- Primary: Initial allocation.
- Secondary: Each extension (up to 15 extents, 123 with SMS).
- Directory: Number of 256-byte directory blocks for PDS. Omit for sequential.
RLSE— Release unused space after close.
Rule of thumb: 1 track ≈ 56 KB; 1 cylinder = 15 tracks ≈ 840 KB (3390 device).
C.3.4 DCB (Data Control Block)
DCB=(RECFM=format,LRECL=length,BLKSIZE=size,DSORG=org)
RECFM values:
| Value | Meaning |
|---|---|
F |
Fixed-length records |
FB |
Fixed-length, blocked |
V |
Variable-length records |
VB |
Variable-length, blocked |
FBA |
Fixed-length, blocked, ASA print control |
VBA |
Variable-length, blocked, ASA print control |
U |
Undefined (load modules) |
Blocking:
BLKSIZEshould be a multiple ofLRECLfor fixed-length records.- Optimal block size: code
BLKSIZE=0and let SMS calculate the optimum (system-determined block size). - For variable-length:
BLKSIZE= maximum block size = maximum LRECL + 4 (BDW) + 4 (RDW), typically.
C.3.5 SYSOUT
//ddname DD SYSOUT=class
Directs output to the JES spool. Class * uses the job's MSGCLASS. Class A is typically the printer.
C.3.6 Common DD Names
| DD Name | Purpose |
|---|---|
SYSIN |
Input stream (inline data or reference to data set) |
SYSOUT |
Standard output (job log messages) |
SYSPRINT |
Program output (DISPLAY statements, reports) |
SYSUDUMP |
Formatted dump on abend (user areas only) |
SYSABEND |
Formatted dump on abend (user + system areas) |
SYSDBOUT |
Debug tool output |
SYSLIN |
Object module output from compiler |
SYSLMOD |
Load module output from linkage editor |
SYSLIB |
Copy library (for COPY statements) |
SORTMSG |
Sort utility messages |
SORTWK01-nn |
Sort work files |
CEEDUMP |
Language Environment formatted dump |
C.4 Procedures (PROC/PEND)
C.4.1 In-Stream Procedure
//procname PROC [symbolic-parm=default,...]
//stepname EXEC PGM=program,...
//ddname DD ...
// PEND
C.4.2 Cataloged Procedure
A cataloged procedure is stored as a member of a procedure library (PROCLIB). It is invoked by name:
//stepname EXEC PROC=procname,symbolic-parm=value
Or simply:
//stepname EXEC procname,symbolic-parm=value
C.4.3 Symbolic Parameters
//MYPROC PROC INFILE='MY.DEFAULT.INPUT',
// OUTCLASS='A'
//STEP01 EXEC PGM=MYPROG
//INPUT DD DSN=&INFILE,DISP=SHR
//OUTPUT DD SYSOUT=&OUTCLASS
// PEND
Override when invoking:
//RUN EXEC MYPROC,INFILE='MY.ACTUAL.INPUT',OUTCLASS='X'
C.5 Common Utilities
C.5.1 IEBGENER — Data Set Copy
//COPY EXEC PGM=IEBGENER
//SYSUT1 DD DSN=input.data.set,DISP=SHR
//SYSUT2 DD DSN=output.data.set,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(50,10)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
SYSIN DD DUMMYperforms a straight copy with no reformatting.- IEBGENER can also do field-level record reformatting via SYSIN control statements (but SORT OUTREC is generally preferred).
C.5.2 IEBCOPY — PDS Copy/Compress
//COMPRESS EXEC PGM=IEBCOPY
//SYSUT1 DD DSN=my.pds.library,DISP=OLD
//SYSUT2 DD DSN=my.pds.library,DISP=OLD
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
When SYSUT1 and SYSUT2 are the same PDS, IEBCOPY performs an in-place compress to recover wasted space.
C.5.3 SORT (DFSORT/SYNCSORT)
//SORT EXEC PGM=SORT
//SORTIN DD DSN=input.file,DISP=SHR
//SORTOUT DD DSN=output.file,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(10,5))
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,10,CH,A,11,5,PD,D)
INCLUDE COND=(16,2,CH,EQ,C'AC')
OUTREC FIELDS=(1,10,21,30,80X)
/*
Common SORT control statements:
| Statement | Purpose | Example |
|---|---|---|
SORT FIELDS |
Define sort keys | SORT FIELDS=(1,10,CH,A) |
MERGE FIELDS |
Define merge keys | MERGE FIELDS=(1,10,CH,A) |
INCLUDE COND |
Include records matching condition | INCLUDE COND=(5,3,CH,EQ,C'ABC') |
OMIT COND |
Exclude records matching condition | OMIT COND=(1,1,CH,EQ,C'X') |
OUTREC FIELDS |
Reformat output records | OUTREC FIELDS=(1,10,25,30) |
INREC FIELDS |
Reformat input records | INREC FIELDS=(1,80) |
SUM FIELDS |
Summarize (eliminate duplicates) | SUM FIELDS=(21,8,PD) |
OPTION COPY |
Copy without sorting | OPTION COPY |
C.5.4 IEFBR14 — Do Nothing
//CREATE EXEC PGM=IEFBR14
//NEWFILE DD DSN=my.new.data.set,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(1,1)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
IEFBR14 is a program that does nothing — it returns immediately. Its sole purpose is to let the DD statements execute, which creates, deletes, or catalogs data sets.
C.6 IDCAMS — Access Method Services
IDCAMS is the primary utility for VSAM data set management. It is invoked as:
//IDCAMS EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
(IDCAMS commands here)
/*
C.6.1 DEFINE CLUSTER (KSDS)
DEFINE CLUSTER ( -
NAME(MY.VSAM.KSDS) -
INDEXED -
KEYS(10 0) -
RECORDSIZE(200 500) -
SHAREOPTIONS(2 3) -
FREESPACE(20 10) -
SPEED -
) -
DATA ( -
NAME(MY.VSAM.KSDS.DATA) -
CYLINDERS(50 10) -
CONTROLINTERVALSIZE(4096) -
BUFFERSPACE(65536) -
) -
INDEX ( -
NAME(MY.VSAM.KSDS.INDEX) -
CYLINDERS(5 2) -
CONTROLINTERVALSIZE(2048) -
)
C.6.2 DEFINE CLUSTER (ESDS)
DEFINE CLUSTER ( -
NAME(MY.VSAM.ESDS) -
NONINDEXED -
RECORDSIZE(100 100) -
SHAREOPTIONS(2 3) -
) -
DATA ( -
NAME(MY.VSAM.ESDS.DATA) -
CYLINDERS(20 5) -
)
C.6.3 DEFINE CLUSTER (RRDS)
DEFINE CLUSTER ( -
NAME(MY.VSAM.RRDS) -
NUMBERED -
RECORDSIZE(200 200) -
) -
DATA ( -
NAME(MY.VSAM.RRDS.DATA) -
CYLINDERS(10 5) -
)
C.6.4 Other IDCAMS Commands
| Command | Purpose | Example |
|---|---|---|
REPRO |
Copy records into/from VSAM | REPRO INFILE(INPUT) OUTFILE(OUTPUT) |
LISTCAT |
List catalog entries | LISTCAT ENTRIES(MY.VSAM.FILE) ALL |
DELETE |
Delete a data set | DELETE MY.VSAM.FILE CLUSTER PURGE |
ALTER |
Change data set attributes | ALTER MY.VSAM.FILE FREESPACE(30 15) |
PRINT |
Print data set contents | PRINT INFILE(DD1) CHARACTER |
VERIFY |
Fix end-of-file marker | VERIFY DATASET(MY.VSAM.FILE) |
DEFINE AIX |
Define alternate index | See section C.6.5 |
DEFINE PATH |
Define path over base + AIX | DEFINE PATH(NAME(path) PATHENTRY(aix)) |
BLDINDEX |
Build alternate index | BLDINDEX INFILE(BASE) OUTFILE(AIX) |
C.6.5 Alternate Index Definition
DEFINE ALTERNATEINDEX ( -
NAME(MY.VSAM.AIX) -
RELATE(MY.VSAM.KSDS) -
KEYS(15 20) -
NONUNIQUEKEY -
RECORDSIZE(50 200) -
SHAREOPTIONS(2 3) -
) -
DATA ( -
NAME(MY.VSAM.AIX.DATA) -
CYLINDERS(5 2) -
) -
INDEX ( -
NAME(MY.VSAM.AIX.INDEX) -
CYLINDERS(2 1) -
)
DEFINE PATH ( -
NAME(MY.VSAM.PATH) -
PATHENTRY(MY.VSAM.AIX) -
)
BLDINDEX INFILE(BASEDD) OUTFILE(AIXDD)
C.7 Generation Data Groups (GDGs)
GDGs provide automatic versioning of data sets. Each generation is numbered relative to the current (0) generation.
C.7.1 Define a GDG Base
//DEFGDG EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE GDG ( -
NAME(MY.GDG.BASE) -
LIMIT(30) -
SCRATCH -
NOEMPTY -
)
/*
| Parameter | Meaning |
|---|---|
LIMIT |
Maximum number of generations to retain |
SCRATCH |
Delete uncataloged generations from disk |
NOSCRATCH |
Keep uncataloged generations on disk |
EMPTY |
Uncatalog all generations when limit exceeded |
NOEMPTY |
Uncatalog only the oldest when limit exceeded |
C.7.2 Using GDGs in JCL
//OUTPUT DD DSN=MY.GDG.BASE(+1),
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(10,5)),
// DCB=(RECFM=FB,LRECL=200,BLKSIZE=0)
//INPUT DD DSN=MY.GDG.BASE(0),DISP=SHR
//PREV DD DSN=MY.GDG.BASE(-1),DISP=SHR
(+1)— New generation (created by this step).(0)— Current (most recent) generation.(-1)— Previous generation.(-2)through(-n)— Older generations.
C.8 Conditional Execution
C.8.1 COND Parameter (Traditional)
The COND parameter tests the return code (condition code) from previous steps. The logic is inverted — if the condition is TRUE, the step is bypassed (not executed).
//STEP02 EXEC PGM=PROG2,COND=(4,LT,STEP01)
This means: "If 4 is less than STEP01's return code" (i.e., if STEP01 returned > 4), then skip STEP02.
Common COND patterns:
| COND | Meaning | In Plain English |
|---|---|---|
COND=(0,NE,STEP01) |
Skip if STEP01 RC != 0 | Run only if STEP01 succeeded |
COND=(4,LT) |
Skip if any prior RC > 4 | Run only if no step returned > 4 |
COND=(0,LT,STEP01) |
Skip if STEP01 RC > 0 | Run only if STEP01 returned 0 |
COND=EVEN |
Execute even if prior step abended | Run regardless of abend |
COND=ONLY |
Execute only if a prior step abended | Run only on abend (cleanup) |
C.8.2 IF/THEN/ELSE/ENDIF (Modern)
// IF (STEP01.RC = 0) THEN
//STEP02 EXEC PGM=PROG2
//...
// ELSE
//STEP03 EXEC PGM=PROG3
//...
// ENDIF
Operators: =, != (or NE), > (or GT), < (or LT), >= (or GE), <= (or LE), NOT, AND, OR.
Checking for abends:
// IF (STEP01.ABEND) THEN
//CLEANUP EXEC PGM=CLEANUP
// ENDIF
// IF (STEP01.ABENDCC = S0C7) THEN
//FIXDATA EXEC PGM=DATAFIX
// ENDIF
IF/THEN/ELSE/ENDIF is strongly preferred over COND for readability. Modern shops should use it exclusively.
C.9 Compile-Link-Go JCL
C.9.1 Using the IBM Cataloged Procedure (IGYWCLG)
//COMPILE JOB (ACCT),'DEVELOPER',CLASS=A,MSGCLASS=X,
// MSGLEVEL=(1,1),NOTIFY=&SYSUID
//*
//CLG EXEC IGYWCLG,
// PARM.COBOL='LIST,MAP,XREF(FULL),SSRANGE,TEST',
// PARM.LKED='LIST,MAP',
// PARM.GO='REPORT,2026'
//*
//COBOL.SYSLIB DD DSN=MY.COPY.LIBRARY,DISP=SHR
//COBOL.SYSIN DD DSN=MY.SOURCE.PDS(MYPROG),DISP=SHR
//*
//LKED.SYSLIB DD DSN=CEE.SCEELKED,DISP=SHR
// DD DSN=MY.LOAD.LIBRARY,DISP=SHR
//*
//GO.INPUT DD DSN=MY.INPUT.FILE,DISP=SHR
//GO.OUTPUT DD DSN=MY.OUTPUT.FILE,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(5,2)),
// DCB=(RECFM=FB,LRECL=200,BLKSIZE=0)
//GO.SYSOUT DD SYSOUT=*
//GO.SYSPRINT DD SYSOUT=*
C.9.2 Manual Compile-Link-Go
//*---------------------------------------------------
//* STEP 1: COMPILE
//*---------------------------------------------------
//COMPILE EXEC PGM=IGYCRCTL,
// PARM='LIST,MAP,XREF(FULL),SSRANGE,SQL'
//STEPLIB DD DSN=IGY.V6R4M0.SIGYCOMP,DISP=SHR
//SYSLIB DD DSN=MY.COPY.LIBRARY,DISP=SHR
//SYSIN DD DSN=MY.SOURCE.PDS(MYPROG),DISP=SHR
//SYSLIN DD DSN=&&OBJMOD,DISP=(MOD,PASS),
// SPACE=(TRK,(10,5)),UNIT=SYSDA
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSUT2 DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSUT3 DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSUT4 DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSUT5 DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSUT6 DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSUT7 DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//*
//*---------------------------------------------------
//* STEP 2: LINK-EDIT
//*---------------------------------------------------
//LKED EXEC PGM=IEWL,
// COND=(8,LT,COMPILE),
// PARM='LIST,MAP,XREF'
//SYSLIB DD DSN=CEE.SCEELKED,DISP=SHR
//SYSLIN DD DSN=&&OBJMOD,DISP=(OLD,DELETE)
//SYSLMOD DD DSN=MY.LOAD.LIBRARY(MYPROG),DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//*
//*---------------------------------------------------
//* STEP 3: EXECUTE
//*---------------------------------------------------
//GO EXEC PGM=MYPROG,
// COND=((8,LT,COMPILE),(8,LT,LKED))
//STEPLIB DD DSN=MY.LOAD.LIBRARY,DISP=SHR
//INPUT DD DSN=MY.INPUT.FILE,DISP=SHR
//OUTPUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
C.10 DB2 Precompile-Bind-Run JCL
When your COBOL program contains EXEC SQL statements, the compile process gains two additional steps: precompile (DSNHPC) and bind (DSNTEP2 or IKJEFT01).
//*---------------------------------------------------
//* STEP 1: DB2 PRECOMPILE
//*---------------------------------------------------
//PC EXEC PGM=DSNHPC,
// PARM='HOST(COBOL),SOURCE,XREF'
//STEPLIB DD DSN=DSNC10.SDSNLOAD,DISP=SHR
//DBRMLIB DD DSN=MY.DBRM.LIBRARY(MYPROG),DISP=SHR
//SYSCIN DD DSN=&&PCSRC,DISP=(MOD,PASS),
// SPACE=(TRK,(20,5)),UNIT=SYSDA
//SYSIN DD DSN=MY.SOURCE.PDS(MYPROG),DISP=SHR
//SYSLIB DD DSN=MY.COPY.LIBRARY,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSTERM DD SYSOUT=*
//SYSUT1 DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSUT2 DD SPACE=(CYL,(1,1)),UNIT=SYSDA
The remaining steps (compile, link-edit, bind, execute) follow the same pattern as the basic compile-link-go, with the precompiled source (&&PCSRC) replacing the original source as compiler input.
C.11 Common JCL Errors and Messages
| Message | Meaning | Resolution |
|---|---|---|
IEF212I stepname - DATA SET NOT FOUND |
DSN does not exist or is misspelled | Verify data set name; check catalog |
IEF244I stepname - UNABLE TO ALLOCATE |
Data set in use or resource unavailable | Check for ENQ conflicts; try later |
IEF272I stepname - STEP WAS NOT EXECUTED |
Step bypassed due to COND parameter | Check prior step return codes |
IEFC001I PROCEDURE procname NOT FOUND |
Cataloged procedure not in PROCLIB | Check procedure name and PROCLIB concatenation |
IEFC452I SUBSTITUTION JCL ERROR |
Invalid symbolic parameter substitution | Verify parameter names and values |
IEF631I SPACE NOT AVAILABLE |
Insufficient disk space | Increase SPACE or use different volume |
IEF607I stepname - CATALOG/UNCATALOG ERROR |
Data set already cataloged (duplicate) | Delete or uncatalog existing entry first |
IEC130I ddname - OPEN ERROR |
File could not be opened | Verify DISP, DCB, and data set status |
IEC141I ddname - ABEND 013-xx |
OPEN error — member not found, wrong RECFM | Check member name, DCB parameters |
IEC143I ddname - ABEND 001-xx |
I/O error during read/write | Check volume status, data set integrity |
IGZ0006S - COBOL ABEND S0C7 |
Data exception — non-numeric data in numeric field | Check input data, INITIALIZE statements |
IGZ0035S - SUBSCRIPT OUT OF RANGE |
Array subscript out of bounds (SSRANGE) | Fix program logic, check loop bounds |
IEC070I ddname - VSAM OPEN ERROR |
VSAM file could not be opened | Check IDCAMS LISTCAT, verify cluster exists |
S806-04 |
Load module not found | Check STEPLIB, JOBLIB; verify link-edit success |
S0C4 |
Protection exception (addressing error) | Check CALL parameters, LINKAGE SECTION, pointer usage |
S0C7 |
Data exception | Non-numeric data in COMP-3 field, uninitialized data |
S322 |
Time limit exceeded | Increase TIME parameter or fix infinite loop |
S722 |
SYSOUT line limit exceeded | Reduce output volume or increase OUTLIM |
S878 |
REGION too small | Increase REGION parameter |
SB37 / SD37 / SE37 |
Out of disk space | Increase SPACE allocation |
C.11.1 Debugging Checklist
When a job fails:
- Check the return code — RC 0 = success, RC 4 = warning, RC 8 = error, RC 12+ = severe error, RC 16 = catastrophic.
- Read the job log (JESMSGLG, JESJCL, JESYSMSG) — look for the first error message.
- Check SYSPRINT — compiler listings, utility messages, program output.
- Check CEEDUMP or SYSUDUMP — for abends, the dump shows the failing instruction and data values.
- Verify DISP parameters — many failures stem from incorrect disposition, especially NEW vs. MOD on GDGs.
- Check REGION — if S878, the program needs more memory.
- Check TIME — if S322, either increase the limit or look for infinite loops.
- Run TYPRUN=SCAN first — catches JCL syntax errors before wasting CPU time.
This JCL reference covers the constructs most commonly used with COBOL programs in an IBM z/OS environment. For comprehensive JCL documentation, consult IBM's z/OS MVS JCL Reference (SA23-1385) and z/OS MVS JCL User's Guide (SA23-1386). For DFSORT, consult DFSORT Application Programming Guide (SC23-6878).