Let's understand Mainframe
Home Tutorials Interview Q&A Quiz Mainframe Memes Contact us About us

Module 2: JCL Structure and Job Card


The JOB Statement

There are three basic functions of JOB statement. Its role is to identify job to Operating system, supply Job name, and supply accounting information (which is used for resource billing). It also supply information that influence the way job is executed and its space limits.

JOB Statement- Format

Let's see the description of the terms used in above Job format.

JOBNAME:-

This indicates the name of the job which will be used to identify job in Spool. You can submit Job with same name multiple times. This filed can be length of 1 to 8 with alphanumeric characters and just starts with //.

JOB:-

In operation field, this keyword is used to indicate that it is JOB card

Positional Parameters:-

Positional parameter must precede keyword parameters. Following are two positional parameters for JOB statement:-

  • Accounting information:- This positional parameter is used to bill or charge back any job that it runs on the mainframe. This information is used to identify account number which will be charged for the CPU time utilized on mainframe
  • Programmer name:- This follows accounting information parameter and not mandatory to specify. This can be used to specify two things:- Programmer’s name or Inform related to job being submitted

Keyword parameters:-

Keyword parameters must follow positional parameters. These parameters can be coded in any order. Let’s see few mostly used keyword parameters:-
 

  • CLASS:- Companies usually assign few classes for Test environment and few classes for Prod environment. This segregation depends on multiple things like time require to execute job, resources used by job.
    Syntax: CLASS=jobclass
    Where, jobclass is any character between A-Z or number between 0-9.
     
  • MSGCLASS: - Specifies the output class to the Job. This can be used to route messages generated from System or OS from Program execution.
    Syntax: MSGCLASS=OUTPUT-CLASS-NAME
    Where OUTPUT-CLASS-NAME can be any alphabetic (A-Z) or numeric (0-9) character.
     
  • MSGLEVEL:- This parameter is used to specify the JCL and allocation messages which will be recorded on the o/p device specified in MSGCLASS.
    Syntax: MSGLEVEL= (Statement, Message)
    Where,
    Statement indicates types of statements written to output log
    • When statement=0 coded, it will print only Job statements
    • When statement=1 coded, it will print Job statements along with symbolic parameter expanded. Also, if catalogued procedure are invoked, then they will also be output.
    • When statement=2 coded, it will print only input Job statements
    Message indicates types of messages written to logs
    • When message=0 coded, only allocation/termination messages being output if the job terminates abnormally.
    • When message=1 coded, No matter job ends normally or abnormally, All allocation/termination messages being output
       
  • PRTY:- It defines priority of Jobs which belong to same class.
    Syntax: PRTY=priority
    Where priority is numeric value whose range is between 0 and 15. 0 indicates lowest priority and 15 indicates highest priority
     
  • TYPRUN:- This parameter is used to indicate a special type of job processing, such as whether a job has to be held until it is manually release or only syntax check of job has to perform without Job execution.
    Syntax: TYPRUN=HOLD/SCAN
    Where functionality of HOLD and SCAN is as described below:-
    • TYPRUN=HOLD, this checks the job for syntax error, and if there is any error it is notified and if there is no error it will held for execution. User have to manually release it for execution by typing ‘A’ as action character against job name in SDSF
    • TYPRUN=SCAN, this only checks job for syntax error, without actual execution.
       
  • NOTIFY:- This parameter is used to send and notify message (Job success/failure) to user.
    Syntax: NOTIFY=USERID
    Where USERID is the mainframe id of user to whom message about job failure/success should go. If you use &SYSUID, message will be send to user who has submitted Job.

Job statement Example:-






© copyright mainframebug.com
Privacy Policy