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.
JOB statement parameters can be categorized by their functions:
Job Identification
Resource Management
Output Handling
Error Handling
These parameters control how and when the job executes in the system.
Specifies the job class, which determines scheduling characteristics and resource allocations.
Format:
1CLASS=x
Where 'x' is a single character (A-Z, 0-9).
Example:
1//PAYROLL JOB (ACCT),'USER',CLASS=A
Specifies the selection priority within a job class.
Format:
1PRTY=nn
Where 'nn' is a number from 0-15 (highest priority is 15).
Example:
1//PAYROLL JOB (ACCT),'USER',CLASS=A,PRTY=12
This job will be selected before other jobs in class A with lower priority values.
Specifies special job processing options.
Format:
1TYPRUN=value
Common values include SCAN, HOLD, JCLHOLD, and COPY.
Value | Description |
---|---|
SCAN | Checks JCL syntax without executing the job |
HOLD | Holds the job until released by operator |
JCLHOLD | Holds the job after converting the JCL |
COPY | Creates a copy of the job without executing it |
Example:
1//TESTJOB JOB (ACCT),'USER',TYPRUN=SCAN
This checks the JCL for errors without executing the job.
These parameters control the resources allocated to a job during execution.
Specifies the maximum amount of virtual storage available to all steps in the job.
Format:
1REGION=valueK | valueM | 0K | 0M
Where 'value' is a number followed by K (kilobytes) or M (megabytes).
Examples:
12//PAYJOB JOB (ACCT),'USER',REGION=4M //BIGJOB JOB (ACCT),'USER',REGION=0M
REGION=0M or REGION=0K requests the maximum available region size.
Specifies the maximum CPU time available for the job.
Format:
1TIME=(minutes,seconds) | TIME=minutes | TIME=1440 | TIME=NOLIMIT
Examples:
123//PAYJOB JOB (ACCT),'USER',TIME=(5,30) //TESTJOB JOB (ACCT),'USER',TIME=10 //LONGJOB JOB (ACCT),'USER',TIME=NOLIMIT
These parameters control the job's output handling and message generation.
Specifies the output class for system messages related to the job.
Format:
1MSGCLASS=x
Where 'x' is a single character (A-Z, 0-9).
Example:
1//PAYJOB JOB (ACCT),'USER',MSGCLASS=A
Controls what JCL and allocation/termination messages are produced in the job's output.
Format:
1MSGLEVEL=(statements,messages)
Value for statements | JCL Listed |
---|---|
0 | Only JOB statement |
1 | All JCL statements, including procedure statements |
2 | Only JCL statements that contain errors |
Value for messages | Messages Listed |
---|---|
0 | No allocation/termination messages |
1 | All allocation/termination messages |
Example:
1//PAYJOB JOB (ACCT),'USER',MSGLEVEL=(1,1)
This lists all JCL statements and all allocation/termination messages.
Specifies a user ID to be notified when the job completes.
Format:
1NOTIFY=userid | NOTIFY=&SYSUID
Examples:
12//PAYJOB JOB (ACCT),'USER',NOTIFY=USER123 //TESTJOB JOB (ACCT),'USER',NOTIFY=&SYSUID
Using &SYSUID automatically notifies the user who submitted the job.
These parameters control job restart capabilities and error handling.
Specifies that a job should be restarted at a specific step or checkpoint.
Format:
1RESTART=stepname | RESTART=(stepname,checkid)
Examples:
12//PAYJOB JOB (ACCT),'USER',RESTART=STEP3 //TESTJOB JOB (ACCT),'USER',RESTART=(STEP2,CHECK4)
Controls whether the system can automatically restart the job after a system failure.
Format:
1RD=R | RD=NC | RD=NR | RD=RNC
Value | Description |
---|---|
R | Restart at checkpoint or step beginning after system failure |
NC | No checkpoint restarts, but restart from step beginning is allowed |
NR | No automatic restarts after system failures |
RNC | Restart at step beginning only, even if checkpoints exist |
Example:
1//PAYJOB JOB (ACCT),'USER',RD=R
These parameters provide security credentials for job execution.
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:
1USER=userid,PASSWORD=password
Example:
1//PAYJOB JOB (ACCT),'USER',USER=PAYUSR01,PASSWORD=XXXXX
Specifies the security group under which the job should run.
Format:
1GROUP=group-name
Example:
1//PAYJOB JOB (ACCT),'USER',USER=PAYUSR01,GROUP=PAYROLL
Below are examples of complete JOB statements with various parameter combinations.
123//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.
1234//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.
1234//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.
1234//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.