MainframeMaster

JCL Tutorial

JOB Statement Parameters

Progress0 of 0 lessons

Overview of JOB Statement Parameters

The JOB statement contains numerous parameters that control how a job is processed, its resource allocation, output handling, and other characteristics. This page covers the most common and important parameters used in the JOB statement.

Parameter Categories

JOB statement parameters can be categorized by their functions:

Job Identification

  • CLASS
  • NOTIFY
  • USER/PASSWORD
  • TYPRUN

Resource Management

  • REGION
  • TIME
  • PRTY

Output Handling

  • MSGCLASS
  • MSGLEVEL
  • OUTLIM

Error Handling

  • RESTART
  • COND
  • RD

Job Execution Control Parameters

These parameters control how and when the job executes in the system.

CLASS

Specifies the job class, which determines scheduling characteristics and resource allocations.

Format:

jcl
1
CLASS=x

Where 'x' is a single character (A-Z, 0-9).

Example:

jcl
1
//PAYROLL JOB (ACCT),'USER',CLASS=A
  • Class determines which initiator processes the job
  • Different classes have different resource allocations
  • Priority can differ by class
  • Some installations use specific classes for different job types

PRTY (Priority)

Specifies the selection priority within a job class.

Format:

jcl
1
PRTY=nn

Where 'nn' is a number from 0-15 (highest priority is 15).

Example:

jcl
1
//PAYROLL JOB (ACCT),'USER',CLASS=A,PRTY=12

This job will be selected before other jobs in class A with lower priority values.

TYPRUN

Specifies special job processing options.

Format:

jcl
1
TYPRUN=value

Common values include SCAN, HOLD, JCLHOLD, and COPY.

ValueDescription
SCANChecks JCL syntax without executing the job
HOLDHolds the job until released by operator
JCLHOLDHolds the job after converting the JCL
COPYCreates a copy of the job without executing it

Example:

jcl
1
//TESTJOB JOB (ACCT),'USER',TYPRUN=SCAN

This checks the JCL for errors without executing the job.

Resource Allocation Parameters

These parameters control the resources allocated to a job during execution.

REGION

Specifies the maximum amount of virtual storage available to all steps in the job.

Format:

jcl
1
REGION=valueK | valueM | 0K | 0M

Where 'value' is a number followed by K (kilobytes) or M (megabytes).

Examples:

jcl
1
2
//PAYJOB JOB (ACCT),'USER',REGION=4M //BIGJOB JOB (ACCT),'USER',REGION=0M

REGION=0M or REGION=0K requests the maximum available region size.

  • Applies to all job steps unless overridden at the EXEC level
  • If job steps require different region sizes, specify REGION on the EXEC statements
  • Actual available memory may be less due to system overhead

TIME

Specifies the maximum CPU time available for the job.

Format:

jcl
1
TIME=(minutes,seconds) | TIME=minutes | TIME=1440 | TIME=NOLIMIT

Examples:

jcl
1
2
3
//PAYJOB JOB (ACCT),'USER',TIME=(5,30) //TESTJOB JOB (ACCT),'USER',TIME=10 //LONGJOB JOB (ACCT),'USER',TIME=NOLIMIT
  • TIME=(5,30) specifies 5 minutes and 30 seconds
  • TIME=10 specifies 10 minutes
  • TIME=1440 (24 hours) or TIME=NOLIMIT disables time limit checking
  • If a job exceeds its time limit, it is automatically terminated

Output Control Parameters

These parameters control the job's output handling and message generation.

MSGCLASS

Specifies the output class for system messages related to the job.

Format:

jcl
1
MSGCLASS=x

Where 'x' is a single character (A-Z, 0-9).

Example:

jcl
1
//PAYJOB JOB (ACCT),'USER',MSGCLASS=A
  • Determines the output class for JCL listings, system messages, and allocation messages
  • Different classes may direct output to different devices or handling processes
  • Some installations use specific classes for different purposes (e.g., A for printing, X for holding output)

MSGLEVEL

Controls what JCL and allocation/termination messages are produced in the job's output.

Format:

jcl
1
MSGLEVEL=(statements,messages)
Value for statementsJCL Listed
0Only JOB statement
1All JCL statements, including procedure statements
2Only JCL statements that contain errors
Value for messagesMessages Listed
0No allocation/termination messages
1All allocation/termination messages

Example:

jcl
1
//PAYJOB JOB (ACCT),'USER',MSGLEVEL=(1,1)

This lists all JCL statements and all allocation/termination messages.

NOTIFY

Specifies a user ID to be notified when the job completes.

Format:

jcl
1
NOTIFY=userid | NOTIFY=&SYSUID

Examples:

jcl
1
2
//PAYJOB JOB (ACCT),'USER',NOTIFY=USER123 //TESTJOB JOB (ACCT),'USER',NOTIFY=&SYSUID

Using &SYSUID automatically notifies the user who submitted the job.

Error and Recovery Parameters

These parameters control job restart capabilities and error handling.

RESTART

Specifies that a job should be restarted at a specific step or checkpoint.

Format:

jcl
1
RESTART=stepname | RESTART=(stepname,checkid)

Examples:

jcl
1
2
//PAYJOB JOB (ACCT),'USER',RESTART=STEP3 //TESTJOB JOB (ACCT),'USER',RESTART=(STEP2,CHECK4)
  • Used to restart a failed job without rerunning all steps
  • If RESTART specifies a step, processing begins at that step
  • If RESTART specifies a checkpoint, processing begins at that checkpoint within the step

RD (Restart Definition)

Controls whether the system can automatically restart the job after a system failure.

Format:

jcl
1
RD=R | RD=NC | RD=NR | RD=RNC
ValueDescription
RRestart at checkpoint or step beginning after system failure
NCNo checkpoint restarts, but restart from step beginning is allowed
NRNo automatic restarts after system failures
RNCRestart at step beginning only, even if checkpoints exist

Example:

jcl
1
//PAYJOB JOB (ACCT),'USER',RD=R

Security Parameters

These parameters provide security credentials for job execution.

USER and PASSWORD

Specifies the user ID and password under which the job should run. These parameters are generally obsolete in modern systems that use RACF or other security products.

Format:

jcl
1
USER=userid,PASSWORD=password

Example:

jcl
1
//PAYJOB JOB (ACCT),'USER',USER=PAYUSR01,PASSWORD=XXXXX
Important Security Note: Including passwords in JCL is not recommended for security reasons. Modern mainframe environments use external security managers like RACF, ACF2, or Top Secret instead of JCL password parameters.

GROUP

Specifies the security group under which the job should run.

Format:

jcl
1
GROUP=group-name

Example:

jcl
1
//PAYJOB JOB (ACCT),'USER',USER=PAYUSR01,GROUP=PAYROLL

Comprehensive JOB Statement Examples

Below are examples of complete JOB statements with various parameter combinations.

Standard Production Job

jcl
1
2
3
//PRODPAY JOB (A123,DEPT45),'PAYROLL PRODUCTION', // CLASS=P,MSGCLASS=A,MSGLEVEL=(1,1), // NOTIFY=&SYSUID,REGION=8M,TIME=30

This production job runs in the high-priority production class (P) with generous memory allocation (8M) and a maximum runtime of 30 minutes. Output goes to class A for printing, and the job submitter will be notified upon completion.

Development/Test Job

jcl
1
2
3
4
//TESTPAY JOB (A123,DEPT45),'&SYSUID', // CLASS=T,MSGCLASS=X,MSGLEVEL=(1,1), // NOTIFY=&SYSUID,REGION=4M,TIME=5, // TYPRUN=SCAN

This test job performs a syntax check only (TYPRUN=SCAN) without actually executing. It uses the test class (T), allocates 4M of memory, and sets a short time limit of 5 minutes. Output is directed to class X, which typically holds output for online viewing.

Restart Job

jcl
1
2
3
4
//RESTPAY JOB (A123,DEPT45),'PAYROLL RESTART', // CLASS=P,MSGCLASS=A,MSGLEVEL=(1,1), // NOTIFY=PAYSUPR,REGION=8M,TIME=30, // RESTART=STEP040,RD=R

This job restarts a failed production job at STEP040. The RD=R parameter allows automatic restart if the system fails during execution. Completion notification goes to the supervisor (PAYSUPR) rather than the submitter.

High-Resource Batch Job

jcl
1
2
3
4
//BATCHJOB JOB (A123,DEPT45),'BATCH PROCESS', // CLASS=B,MSGCLASS=A,MSGLEVEL=(1,1), // NOTIFY=&SYSUID,REGION=0M,TIME=NOLIMIT, // PRTY=8,BYTES=(50000,WARNING)

This intensive batch processing job requests maximum available memory (REGION=0M) and unlimited CPU time (TIME=NOLIMIT). It has a fairly high priority (PRTY=8) and includes a warning if the job exceeds 50,000 bytes of output.