The JOB statement, the first statement in a JCL stream, identifies the job to the operating system. Besides the mandatory jobname, accounting information, and programmer name fields, it accepts numerous optional parameters that control the job's execution environment and behavior.
This tutorial covers some of the most commonly used JOB statement parameters.
1//jobname JOB (acct),'programmer',CLASS=...,MSGCLASS=...,NOTIFY=...,...
Assigns the job to a specific job class (A-Z, 0-9). Job classes are defined by the installation to manage resource allocation and job scheduling priorities. Different classes might have different limits on CPU time, memory, or concurrent executions.
1//PAYROLL JOB ...,CLASS=P,... // Production job class
1//TESTJOB JOB ...,CLASS=T,... // Test job class
Specifies the output class for job log messages (JESMSGLG, JESJCL, JESYSMSG). Output classes route messages to specific output devices or hold queues.
1//MYJOB JOB ...,MSGCLASS=X,... // Route job log to class X
1//BATCH JOB ...,MSGCLASS=H,... // Hold job log output
Controls which JCL statements and system messages are printed in the job log.
1//DEBUG JOB ...,MSGLEVEL=(1,1),... // Print all JCL and messages
1//PRODJOB JOB ...,MSGLEVEL=(0,0),... // Print minimal messages
Specifies the user ID to receive notification messages upon job completion (or failure). Using the symbolic parameter &SYSUID sends the notification to the user who submitted the job.
1//REPORT JOB ...,NOTIFY=&SYSUID,... // Notify submitting user
1//ALERT JOB ...,NOTIFY=OPER1,... // Notify operator OPER1
Specifies conditions under which the entire job should NOT run, based on the return codes of previous jobs (if part of a job group) or potentially steps within the same job (less common on JOB statement). See separate COND parameter tutorial for details.
1//STEP2 JOB ...,COND=(4,LT),... // Don't run if any prior step RC > 4
Specifies the maximum CPU time the job is allowed to consume. Exceeding this limit causes a S322 abend.
1//COMPUTE JOB ...,TIME=10,... // Limit to 10 minutes CPU time
1//LONGJOB JOB ...,TIME=NOLIMIT,... // No CPU time limit
Specifies the amount of virtual storage (memory) the job requires. Can be specified in Kilobytes (K) or Megabytes (M). REGION=0K or REGION=0M typically requests all available storage below and above the 16MB line, respectively (subject to installation limits).
1//BIGMEM JOB ...,REGION=64M,... // Request 64 Megabytes
1//GETALL JOB ...,REGION=0M,... // Request maximum available memory
Controls special job processing:
1//CHECK JOB ...,TYPRUN=SCAN,... // Scan JCL for errors
1//WAIT JOB ...,TYPRUN=HOLD,... // Hold job until released
Specifies the user ID under which the job should run for security validation (e.g., RACF checks). Often required in secure environments.
1//SECURE JOB ...,USER=PAYROLL,...
Specifies the password associated with the USER ID. Obsolete in modern systems using security managers like RACF. **Avoid using PASSWORD.**
1//OLDJOB JOB ...,USER=LEGACY,PASSWORD=OLDPASS,... // Avoid this!
Requests an automatic restart of the job from a specific step if the job fails and is resubmitted. Useful for multi-step jobs.
1//UPDATE JOB ...,RESTART=STEP030,... // Restart from STEP030 if job fails
1//PROCRUN JOB ...,RESTART=STEP010.PSTEP2,... // Restart from PSTEP2 within STEP010
Positional parameters (jobname, accounting, programmer name) must appear first and in order. Keyword parameters (CLASS, MSGCLASS, etc.) can appear in any order after the positional parameters.
If a parameter is omitted, the system uses installation-defined defaults. These defaults are set by system programmers in JES parameters or system exits.
Write a JOB statement for a job named `MYTEST`, with accounting info `(ACCT123)`, programmer name `'Test User'`, assigned to test class `T`, with message class `X`, notifying your user ID upon completion, and requesting maximum memory.
Modify the JOB statement from Exercise 1 to only perform a syntax scan (TYPRUN=SCAN) and print all JCL statements and allocation messages (MSGLEVEL).
Some parameters like REGION and TIME can be coded on both JOB and EXEC statements. If specified on both, the EXEC statement value overrides the JOB statement value *for that specific step only*.
Installation defaults set in the JES parameters (JES2 or JES3) determine the default job class and message class if they are not specified on the JOB statement.
Not necessarily. While REGION=0M requests the maximum available memory (subject to limits), it might lead to inefficient memory usage if the job doesn't actually need that much. It can also prevent other jobs from running if it hogs too much memory. It's often better to estimate the required region size or use installation standards.
1. Which parameter assigns a job to a scheduling category?
2. What does MSGLEVEL=(1,1) typically achieve?
3. Which TYPRUN value checks JCL syntax without running the job?
4. What does NOTIFY=&SYSUID do?
5. Which parameter limits the total CPU time a job can use?