Master Mainframe Technologies - COBOL, JCL, DB2, VSAM, CICS & More
ABEND Codes SQLCODEs File Status Interview Prep Contact
🖥 JCL

JCL JOB Statement

Beginner 🕑 15 min read 👁 0 views

JOB Statement Overview

The JOB statement is the first statement in any JCL job. It identifies the job to the operating system and specifies job-level parameters.

JOB Statement Syntax

//jobname JOB (accounting),"programmer name",parameters

Common JOB Parameters

ParameterDescription
CLASSJob class determining execution priority
MSGCLASSOutput class for job messages
MSGLEVELLevel of messages to print
NOTIFYUser to notify when job completes
TIMEMaximum CPU time allowed
REGIONMemory allocation for the job
PRTYJob priority
TYPRUNSpecial job processing (SCAN, HOLD)
RESTARTStep to restart from
CONDJob-level condition code checking

MSGLEVEL Parameter

MSGLEVEL=(statements,messages)

  • (0,0) - Minimum output
  • (1,1) - All JCL and messages
  • (2,1) - Input JCL only plus messages

TIME Parameter

  • TIME=1440 - No time limit
  • TIME=(mm,ss) - Minutes and seconds
  • TIME=NOLIMIT - No limit

Code Example

//PAYROLL  JOB (12345,DEPT01),"JOHN SMITH",
//             CLASS=A,
//             MSGCLASS=H,
//             MSGLEVEL=(1,1),
//             NOTIFY=&SYSUID,
//             TIME=(30,00),
//             REGION=0M,
//             PRTY=10
//*
//* JOB WITH TYPRUN=SCAN (SYNTAX CHECK ONLY)
//TESTJOB  JOB ,,TYPRUN=SCAN
//*
//* JOB WITH RESTART
//BIGJOB   JOB (ACCT),"PROG",
//             RESTART=STEP03
//*
//* JOB WITH CONDITION CODE
//CONDJOB  JOB (ACCT),"PROG",
//             COND=(4,LT)