Bulletin Board

What’s new at MAINFRAMES 360
(Updates June '10)...
- I am writing articles on CICS. The effort would be to make the material of certain standard, practical and easy to comprehend.
- JCL needs fresh look, and more weightage needs to assigned to conventions and practises adopted in Production Environments at most sites
- A note of appreciation : Thanks to all our followers, for making Mainframes360 a success!

Mainframes360 Search

Loading

Quick Links

Jump to :  

Tuesday, April 7, 2009

JOB Statement

Q. What is the purpose of JOB Statement?
Every JOB/JCL begins with a JOB Statement. The JOB Statement establishes the identity of your JOB. It conveys a lot of extra-information about the JOB. When you write a new JCL, you must first code the JOB Statement.

//name JOB parameters ...

The name that you assign to the JOB Statement, is called Job-name. In real-time projects, usually Production Region Jobs are named, based on the team or system to which they belong. For example, if a JOB belongs to ABC Team, it would be named as,

//ABCXXXXX JOB parameters...

Generally, in Test/Integration Environment, you write your own personal toy-jobs, that belong only to you individually. To signify this, you generally name your personal jobs after your TSO-Userid.

//AGY0157A JOB parameters ...
Q. What is the accounting-information parameter?
Accounting information in an IBM-Mainframe system is used to bill/charge any job that is run on a Mainframe computer. You must tell the MVS OS, the account number to which to bill the CPU time utilized. In the olden days, programmers were billed(charged) for computer-time that they used on a Mainframe, to do their work.

//AGY0157A  JOB  A123

Here A123 is the account number to  which the CPU time utilized on the Mainframe will be billed.

//AGY0157A JOB (,QUASAR)
 
Here QUASAR is the additional accounting information. The leading comma indicates the absence of the positional parameter Account no.

//AGY0157A JOB  (A123,'QUASAR S')

Given below is a simple JOB, that shows the use of Accounting-information parameter. You can try and submit this job, and see the output.

Image118[1]
Q. What is labelling and/or routing information?
As a job runs, MVS Operating System prints messages about the status of the job, what the job is doing. You can code labelling field on the Job Statement, so that when the Job Output is printed, each of the "separator-pages" will be labelled. This will allow the help personnel to physically separate the output from the output of other jobs at the printer.

Image121[1]

For example, in my project, they provide 100 "bins" for the print output. By putting 'BIN 7' as the label, I am telling MVS to print the label 'BIN 7' on each of the separator pages. The personnel operating the Mainframe printer, will know to put my output in Bin 7.
Q. What are keyword parameters?
Keyword parameters are those, which can appear in any order. They are identified by writing the keyword. The following keyword parameters are important for the JOB statement.
- CLASS, PRTY, MSGCLASS, MSGLEVEL, TYPRUN, TIME, NOTIFY
Q. What is the CLASS parameter?
The CLASS parameter is used to categorize the job. Generally, in most sites/projects, System Programmers setup these categories, during the installation of the MVS Operating System. It is customary to follow these default settings. For example, in my project, they follow these standards -CLASS=A to be used for small jobs, CLASS=G for medium-jobs, and CLASS=R for long-running jobs. Categorizing the jobs this way, helps the MVS operating system to easily pick up a job for execution.

Given below is a simple JOB, that shows the use of CLASS Parameter. You can try and submit this job, and see the output.

Image119[1]

Here, the job is categorized as Class=A.
Q. What are Input and Output Queues?
Back in the 1970’s era, input devices were different. The friendly keyboard was not available at the time. So, the input data that you want to feed to the IBM Mainframe, had to punched in the form of holes in a Punch Card. Usually, a JOB would be a set/deck of cards. Submitting a Job, or giving a JOB for processing to the Mainframe Computer, meant placing the deck of punch cards on a hopper and pressing the Start Button, to start feeding them through a Card Reader. The computer received a stream(series) of Electronic signals, representing the holes in the punched cards.

This whole process was much slower than the computer system itself, so what transcended is, that the entire JOB would first be saved in a Disk File(a staging area). The Mainframe Computer would then pick up the Job from the Disk staging area and process it in one go(in a single shot).

Now-a-days, people type the Job(JCL). When you submit the Job(give the JOB to the Mainframe computer for processing), the Job(JCL) first gets stored in a Disk Dataset(a staging area). This disk dataset is called the Input Queue. In fact, everyone’s jobs are first stored in the Input Queue. The MVS Operating system quickly scans the Job(JCL) for any syntax errors. The JCL that is syntactically correct gets to remain in the Input Queue. The one’s which have faulty syntax are brought another staging area called the Output Queue. The Input and the Output Queues are managed by a software called the JES(JOB Entry System). JES comes in two flavours JES2 and JES3.

You might wonder, could I see the Jobs that are there in the Input Queue and the Output Queue? On a Mainframe, you can see the Input Queue and the Output Queue by typing START SDSF or in short START S on the Command line in TSO/ISPF.

Image122[1] 

Upon invoking the SDSF utility, the SDSF screen shall be displayed. SDSF menu provides options to view several queues, like Input Queue(I), Output Queue(O), Status Queue(ST). As you know, the print output of completed jobs can be seen in Status Queue(ST).

Image123[1]
Q. How does MVS pick jobs for execution?
Let me figure this out.. After the job enters the Input Queue, how does the MVS pick your job for execution? Well, first your job has to await its turn on the Processor, if there other jobs in the Queue. When the Job has finally reached at the front of queue, and is all set to enter the CPU, it is assigned an Initiator. This marks the beginning of Job Execution. At this point in time, we would say, "The job is initiated".

The Initiator is like a Personal Assistant. It guides the job, advises the job, and assists it all along its journey, right from picking up the job from the Input Queue, throughout execution, till the job reaches the Output Queue. Once an initiator becomes free, it goes back to Input Queue to seek another job.
Q. So, you are saying, "MVS uses helper programs called Initiators to pick jobs from Input Queue.., right?"
Absolutely, you got that registered in your mind! To give you some more insight, every Initiator has its own class list. For example, Initiator-1 may have a class list 'EQPAS'. Then, whenever the Initiator is free, what it does is, to go the Input Queue, and look for a class E Job. If it finds, there are no Class E jobs waiting, then it looks for class Q Jobs and so on..

Its pretty simple, depending on the CLASS parameter is coded on your JOB Statement, your job is likely to get the assistance of any one of free initiators, who have this Class on their Class list.

What if, suppose you have coded CLASS=C on your JOB Statement, but the installation does not define Job class C. It means, no initiators have class C on their Class list. So, your job will simply sit waiting forever in the Input Queue, without getting initiated.

Image129[1]
Q. What is the MSGCLASS Parameter?
The Log-report of your Job is brought to the Output Queue area. There’s not just one Output Queue, but there are several classes of Output Queues. MSGCLASS parameter tells in which Output Queue, do you want your Log reports? If you want to send the Log-Report of the Job for printing to the Mainframe Printer, you code MSGCLASS=P. If you want to send the Log-Reports for Punching, you code MSGCLASS=X. If you want the Log-Report, to be held on the Output Queue itself, you code MSGCLASS=Y. You may use SDSF Software the view the contents of the Output Queue; the log-reports held in the Output Queue(Spool). Your Installation guys(project) define different print class codes(A,B,C,D,...X,..) for different output queues.  
 
Image130[1] 
Q.What is the MSGLEVEL Parameter?
The MSGLEVEL parameter is coded on the JOB Statement. It tells, how much
level-of-detail information should be printed in the Log-report? 2 pages, 3 pages, 5 pages. In other words, you can control the level of detail on the Log Report by coding MSGLEVEL Parameter on the JOB Statement.

A MSGLEVEL(0,1) prints only the JOB Statement. Look at the picture below, and see how I’ve coded MSGLEVEL(0,1).

Image222[1]

When you look at the JCL Listing(JESJCL) in the Spool, only the JOB Statement is displayed, all the detailed information is suppressed. A MSGLEVEL=(0,1) produces the least amount of detail in the Log-report.

Image221[1] 

A MSGLEVEL=(1,1) results in the maximum level-of-detail information to be spitted out in the Log-Report. If you don’t code a MSGLEVEL on the JOB Statement, by default it assumes a MSGLEVEL=(1,1). When the MSGLEVEL is set to (1,1), the complete Original JCL that you’ve typed is printed to the Log-Report. Not just this, even PROCs(ready-made jobs) expansions are printed. More on PROCs later.

The picture below contrasts how the level-of-detail of information in the Log report differs on coding a (1,1) – complete original JCL + PROCS, compared to (0,1) – just the Job Statement(Header).

Image223[1]

0 comments:

Post a Comment

Related Posts with Thumbnails

Quick Links

Jump to :  

Note :

© Copyright – Quasar Chunawalla, 2010.
Note : The copyrights of all the material, text and pictures posted in this website belong to the author. Any instance of lifting the material from this website, shall be considered as an act of plagiarism. For any clarifications, please mail at quasar.chunawalla@gmail.com
 
back to top