ArticleslgStudy

science

Job Control Language

Job Control Language is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Job Control Language rather than just read about it. In short: Job Control Language (JCL) is a programming language for scripting and launching batch jobs on IBM mainframe computers. JCL code determines which programs to run, and with which files and devices for input and output.

Key takeaways

  • Job Control Language belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Job Control Language to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Job Control Language from memory before moving on to harder problems.

Reference excerpt

Job Control Language (JCL) is a programming language for scripting and launching batch jobs on IBM mainframe computers. JCL code determines which programs to run, and with which files and devices for input and output. Parameters in the JCL can also provide accounting information for tracking the resources used by a job and can set which machine the job should run on. There are two major variants based on host platform and associated lineage. One version is available on the platform lineage that starts with DOS/360 and has progressed to z/VSE. The other version starts with OS/360 and continues to z/OS which includes JES extensions, Job Entry Control Language (JECL). The variants share basic syntax and concepts but have significant differences. The VM operating system does not have JCL as such; the CP and CMS components each have command languages. Generically, a job control language is any programming language for job control; not just the IBM mainframe one.

Terminology JCL-specific terminology includes:

Data set A file, either temporary or permanent; it may be located on a disk drive, tape storage, or another device.

Partitioned data set (PDS) A collection of files; a PDS is commonly used to store textual data such as source code, assembler macros (SYS1.MACLIB), system configuration (SYS1.PARMLIB), reusable JCL procedures (SYS1.PROCLIB), etc. As a collection of files, a PDS is like to an archive file (ZIP, TAR, etc.) which in turn is like a file system directory. A PDS can contain executable code (load modules or program objects) which makes a PDS like a Unix-based static library. A member, once stored, cannot be updated although a member can be deleted and replaced, such as via the IEBUPDTE utility. Since the 1989 release of MVS DFP 3.2, an enhanced version, partitioned data set extended (PDSE) has been available.

Member A file (data set) in a PDS. A member can be accessed by specifying the name of the PDS with the member name in parentheses. For example, the system macro GETMAIN in SYS1.MACLIB can be referenced as SYS1.MACLIB(GETMAIN).

Unix system services (USS) A complete Unix environment running as part of the MVS base control program. It allows Unix files, scripts, tasks, and programs to run on a mainframe in a POSIX-compliant Unix environment without virtualization.

Motivation Originally, mainframe systems were oriented toward batch processing. Many batch jobs require setup, with specific requirements for main storage, and dedicated devices such as magnetic tapes, private disk volumes, and printers set up with special forms. JCL was developed as a means of ensuring that all required resources are available before a job is scheduled to run. For example, many systems, such as Linux allow identification of required datasets to be specified on the command line, and therefore subject to substitution by the shell, or generated by the program at run-time. On these systems the operating system job scheduler has little or no idea of the requirements of the job. In contrast, JCL explicitly specifies all required datasets and devices. The scheduler can pre-allocate the resources prior to releasing the job to run. This helps to avoid "deadlock", where job A holds resource R1 and requests resource R2, while concurrently running job B holds resource R2 and requests R1. In such cases the only solution is for the computer operator to terminate one of the jobs, which then needs to be restarted. With job control, if job A is scheduled to run, job B will not be started until job A completes or releases the required resources.

Features common to DOS and OS JCL

Jobs, steps and procedures For both DOS and OS the unit of work is the job. A job consists of one or several steps, each of which is a request to run one specific program. For example, before the days of relational databases, a job to produce a printed report for management might consist of the following steps: a user-written program to select the appropriate records and copy them to a temporary file; sort the temporary file into the required order, usually using a general-purpose utility; a user-written program to present the information in a way that is easy for the end-users to read and includes other useful information such as sub-totals; and a user-written program to format selected pages of the end-user information for display on a monitor or terminal. In both DOS and OS JCL the first "card" must be the JOB card, which:

Identifies the job. Usually provides information to enable the computer services department to bill the appropriate user department. Defines how the job as a whole is to be run, e.g. its priority relative to other jobs in the queue. Procedures (commonly called procs) are pre-written JCL for steps or groups of steps, inserted into a job. Both JCLs allow such procedures. Procs are used for repeating steps which are used several times in one job, or in several different jobs. They save programmer time and reduce the risk of errors. To run a procedure one simply includes in the JCL file a single "card" which copies the procedure from a specified file, and inserts it into the jobstream. Also, procs can include parameters to customize the procedure for each use.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Job Control Language

Start with the simplest possible case. Write down what Job Control Language claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Job Control Language before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Job Control Language ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Job Control Language

In research
Job Control Language appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Job Control Language in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Job Control Language is common in secondary-school and first-year university syllabi. It links to neighbouring topics IBM mainframe operating systems, Job scheduling, Scripting languages, so understanding it makes those chapters shorter.
In everyday life
Look for Job Control Language outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Job Control Language” →

How to study Job Control Language in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Job Control Language means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Job Control Language out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Job Control Language in simple terms?

Job Control Language (JCL) is a programming language for scripting and launching batch jobs on IBM mainframe computers. JCL code determines which programs to run, and with which files and devices for input and output.

Why does Job Control Language matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Job Control Language?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Job Control Language.

Tags

  • IBM mainframe operating systems
  • Job scheduling
  • Scripting languages

Keep exploring