The JOB statement is the first statement in a JCL job and identifies the beginning of a job. It provides the system with essential information about the job's identity, resource requirements, and processing characteristics.
1//jobname JOB (accounting-info),'programmer-name',parameter-list
The JOB statement consists of several parts, most of which can be customized based on installation requirements and job needs.
1. Identifier Field (columns 1-2)
2. Name Field (columns 3-10)
3. Operation Field (column 12+)
4. Operand Field
The jobname is a critical identifier for your job and follows specific naming conventions.
Some installations implement naming standards that encode information in the jobname, such as application identifier, environment, or job type. Always follow your installation's naming conventions.
The accounting information field in the JOB statement provides billing and resource tracking information. Its format is installation-dependent and may be required in some environments.
The accounting information is enclosed in parentheses and may contain multiple subparameters separated by commas:
1//MYJOB JOB (account,department,room,etc),...
Some installations use a simple account number, while others may require more detailed information:
1//MYJOB JOB (D58192),...
1//MYJOB JOB (D58192,DEPT123),...
1//MYJOB JOB (D58192,DEPT123,'ROOM 101'),...
The accounting information is used for billing purposes, resource tracking, and access control. Consult your installation's standards for the specific format required.
The programmer name field identifies the person responsible for the job. It typically appears after the accounting information.
The programmer name is enclosed in apostrophes and can be up to 20 characters long:
1//MYJOB JOB (account),'JOHN SMITH',...
The programmer name appears on job output headers and can be used to route output to specific locations.
Using a symbolic parameter like &SYSUID is common to automatically include the submitter's user ID.
The programmer name is primarily used for identification purposes. In production environments, it often identifies the owning application or department rather than an individual programmer.
Below are examples of JOB statements with varying levels of complexity.
1//MYJOB JOB (A123),'JOHN SMITH'
This basic JOB statement includes only the required elements - jobname, accounting information, and programmer name. All other parameters use installation defaults.
12//PAYROLL JOB (A123),'JOHN SMITH',CLASS=A, // MSGCLASS=X,NOTIFY=&SYSUID
This example includes CLASS and MSGCLASS to control execution class and output routing, and NOTIFY to send completion messages to the submitter.
1234//PAYROLL JOB (A123,DEPT123,'ROOM 101'),'JOHN SMITH', // CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID, // MSGLEVEL=(1,1),REGION=0M,TIME=NOLIMIT, // TYPRUN=SCAN,USER=PAYUSR01,PASSWORD=XXXXXXXX
This comprehensive example includes detailed accounting information, execution parameters, resource specifications, and security credentials. The TYPRUN=SCAN parameter indicates this job will be checked for syntax errors only, without actual execution.
1234567//*--------------------------------------------------* //* STANDARD SITE JOB CARD FOR PRODUCTION PAYROLL * //*--------------------------------------------------* //PAYPR01 JOB (PAY123),'PAYROLL PRODUCTION', // CLASS=P,MSGCLASS=X,NOTIFY=&SYSUID, // MSGLEVEL=(1,1),REGION=8M,TIME=1440, // RESTART=STEP040,TYPRUN=HOLD
This example shows a production job with site-specific conventions, including descriptive comments, a standardized jobname, and parameters tailored for a production payroll job.
Following these best practices will help create robust and maintainable JOB statements.