JOB statement

Abhishek Rathi
A free video tutorial from Abhishek Rathi
Mainframe Developer | Electronics & Communications Engineer
4.3 instructor rating • 4 courses • 18,144 students

Lecture description

JOB statement is the first statement in any JCL program. JOB statement tells the name of the JOB, the location of the output, priority and other such information. The parameters given in JOB statement are applicable to all the steps in the JCL. The Job statement is explained in detail including all the parameters of the JOB statement.

This lecture explains all the parameters required in the JOB statement such as CLASS, MSGCLASS, MSGLEVEL, PRTY, NOTIFY and many more.

Learn more from the full course

The Complete Job Control Language (JCL) Course.

Mainframe JCL Procedures, SORT, GDGs, Libraries, Utilities such as IEBCOPY, IEBGENER etc are explained in detail.

08:00:02 of on-demand video • Updated May 2020

  • You will learn SORT in JCL
  • You will be able to code Utilities of JCL
  • You will code 50+ JCL programs
  • You will code Procedures in JCL
  • You will be able to Install Mainframe Emulator on your Personal Computer
  • You will be able to submit programs to the Mainframe Computer
  • You will be able to troubleshoot JCL programs on Mainframe Computer
  • You will be able to create and edit GDGs
  • You will understand JOB Processing on Mainframes
  • You will be able to create and edit different types of datasets
  • You will be able to code and understand Libraries in JCL
  • You will also get all the presentations used in the course so you wont have to take notes
English JOB statement is also known as a JOBCARD. The first two filelds are line identifiers. Backslashes(//) Then you give the name of the job. let's give SORTJOB Name of the job Could be maximum of 8 characters. It could be alphanumeric and the first character of any job name Should not be Number. Suppose if I give like this. This is an invalid JOBNAME. The first character should be alphabet or national character. Like this It should not be a number. This is invalid so this is name of the job SORTJOB. It should be same as the name of the member. The name of the member is SORTJOB and name of the job is also SORTJOB. Then give the JOB operand After job Give space again and give the positional parameter the first positional parameter is accounting information. Accounting information is used to uniquely identify a User. for example This is my employer ID So this will be my accounting information To get your accounting information. You have to contact your system administrator This accounting information can also have The name of your department for example It could also have sales That means I am from the sales department It could also have HR I am from HR department If your account information has Long details you have to give it in parenthesis Like this This is my Employee ID and this is the department I belong Accounting information varies from system to system so you have to contact your system administrator To know What is your account information This is a positional parameter That means If you do not code it then you have to give a comma. this means that you have skipped the Positional parameter So I am skipping it and I am giving it comma. And after that you have to give programmer name is Abhishek These two are the positional parameter. Apart from this you can give Keyword parameters. Keyword parameters Can appear in any order For example Accounting information was a positional parameter that means It has To be the first thing that has to be coded after the JOB operand Directly after job you have to give the Account information then comma then the programmer name After that you can give the keyword parameters So let's enter other keyword parameters CLASS. CLASS can be A B C And so on it can be up to A to Z and 0 to 9 Every CLASS Define a certain function for example In our System CLASS of P means This is a print job Class of A means, its an accounting job and so on Your system administrator define a class of jobs So depending on the program you are coding you can give the class Another keyword parameter is Priority PRTY. Priority could be 0 to 15 15 means highest priority 14 means Second highest priority 0 means the least priority So the higher the priority higher is the importance of this job Suppose I give a Priority of 15 fifteen That means in the class A This job has the highest priority So you can understand A class means this is an Accounting job And it has the highest priority So if there are 20 jobs which are running in the class A Then The first job To be executed will be this job SORTJOB then the JOB which has priority of 14 then the JOB which has priority of 13 So this is the importance of PRTY keyword Parameter. Another keyword parameter is NOTIFY. NOTIFY means Which person to Notify once the job is completed. For example I will give my ID. My ID is A12345 So that means once the job is completed I will receive a message That my job has completed and this is the result of my job. you can give someone else ID also. suppose I give John This is the id of John. once the job completed John will be notified that This job has been completed And these are the errors or successful completion of the job You can also give &SYSUID That means The person who submit this job Will be notified &SYSUID means The person who will submit this job Will get notified. Once the job complete Another keyword parameter is MSGCLASS MSGCLASS can be from A to Z or 0 to 9 Suppose I give a MSGCLASS of A MSGCLASS just Defines what are the messages That are to be Displayed. Another parameter is MSGLEVEL. MSGLEVEL consists of two parameter: Statement and Messages. MSGLEVEL value can be zero One or two. similarly the message can be 0, 1 TYPRUN parameter TYPRUN can be SCAN or it can be HOLD SCAN means Only SCAN this JCL for errors and don't run the job HOLD means Just HOLD this job For example don't execute this job when I submit Just hold it in the system TIME parameter TIME parameter tells the maximum time for which the job can execute It is usually given in minute then second So if I give 50 fifty 00 means This job can execute for a maximum of 50 minutes REGION REGION means Address space that will be allocated to this job. This is coded as nK or nM K stands for kilobytes, M stands for Megabytes So i gave 5K that means 5K of Address space will be allocated for this job to run If I give 5M means 5 megabyte of space will be allocated to the job to run I am giving 5k These are the Keyword parameters that means I can code it in Any sequence So I can give REGION before CLASS then also there is no problem. They can be coded in any sequence these are the different parameters. These are the positional parameter rest are the Keyword parameters. JOB statement is also known as JOBCARD. JOB statement is the first statement in any JCL code. It marks the start of the job and give the name of the job. Syntax of JOB statement is //JOBNAME JOB and then parameters JOBNAME must be 1 to 8 characters long It must be coded from position 3 First character of JOBNAME must be either alphabetic or national character. The parameters in JOB statement are Positional parameters are accounting information. it refers to the person or Personal group to Which the CPU time is owned. It is system specific and is not mandatory If absent it should be replaced with comma indicating its absence. Programmer name is the person of group who owns this JCL. it is not mandatory. Keyword parameters are CLASS It can be 0 to 9 or a to z. Jobs which are similar in some aspect are grouped together in one CLASS. PRTY specify the priority of the job within one CLASS. It can be zero to 15. 15 is the highest priority, zero is the Lowest priority. TIME is the maximum time allocated for the job execution. MSGCLASS is the output destination of the job messages. it can be 0 to 9 or a to z Example MSGCLASS of P could mean Print the job output MSGCLASS of A could mean Fax the job output. message class of B could mean That email the Job output. MSGLEVEL is The type of messages to be returned to the output. it consists of two parameters, statement and message MSG Statement when it is zero means only type the job statement in the output 1 means type the jcl with the symbolic parameters too, 2 means only the jcl Message of zero means The output will only be written when the Job abends with an abnormal termination. 1 means messages will be written irrespective of the normal or abnormal termination TYPRUN specifies the special processing of the job TYPRUN of scan means just check the syntax error of the jcl and do not execute it TYPRUN of hold means put the job on hold which can later be executed if required. Notify means The user which has to be notified on the completion of the job REGION is the amount of address space to be allocated for job execution when a parameter is omitted it takes up the default system value which was defined by the system administrator. To summarise, job statement is also known as job card and is the first statement in a JCL code which marks the start of of the JOB and gives the name of the JOB. Syntax is //JOBNAME JOB then parameters JOBNAME must be 1 to 8 characters And must be coded from position 3. First character of job name must be alphabetic or national character. The parameters in job statement are: Accounting information, programmer name are the positional parameters. Keyword parameters are CLASS, PRTY, NOTIFY, MSGCLASS, MSGLEVEL, TYPRUN TIME and REGION When a parameter is omitted it takes the default system value.