1 of 23

MVS Concepts Lesson 1

History and Basics

by

Philip L. Yuson

Copyright © Concept Solutions Corporation

2 of 23

Learning Objective

By the end of the course, the learner will be able to:

  • Describe the general components of a computer system
  • Define virtual storage
  • Describe why multitasking is important

Copyright © Concept Solutions Corporation

3 of 23

Basic Components of a Computer

Processor

Memory

All computers have a processor, memory and input output devices.

Copyright © Concept Solutions Corporation

4 of 23

Basic Components of a Computer

The input/output devices are interfaces that the user uses to interact with the processor

The data can be used immediately or stored and used whenever it is needed.

Copyright © Concept Solutions Corporation

5 of 23

Basic Components of a Computer

Processor

The processor is responsible for controlling everything in the computer system.

It executes commands to perform specific functions.

Copyright © Concept Solutions Corporation

6 of 23

Basic Components of a Computer

Memory

The memory contains data that the processor uses

Copyright © Concept Solutions Corporation

7 of 23

Mainframe Computer

A mainframe computer functions the same way as a basic computer.

  • It has a processor, it has memory and it also has lots of input and output devices.
    • Its processor may not be as simple as a basic computer
    • Input output devices are a lot more complex than a basic computer
  • It is used in many organizations especially those that require fast and large processing capacity.

Copyright © Concept Solutions Corporation

8 of 23

Operating System

Some basic functions in a computer system can be repeated. Examples of these will be reading or writing to an I/O device, managing memory or managing the workload within a system.

These functions are controlled by programs that directly operate the processor and hardware. These programs are called operating systems.

An operating system therefore is a set of programs that provide common functions to other programs. It also controls how the processor operates and manages tasks.

The mainframe operating system has undergone several iterations. It is currently called z/OS. It used to have several versions but the more popular name is MVS which stands for Multiple Virtual Storage.

Copyright © Concept Solutions Corporation

9 of 23

Virtual Storage

Processor

Memory

Remember this diagram? The memory is limited by its physical size.

In a PC, when you buy 4 GB of memory, that is the physical size of your memory.

Copyright © Concept Solutions Corporation

10 of 23

Virtual Storage

The mainframe operating system allows you to increase your storage to say 8GB or more even if you have a physical memory of 4GB.

MVS can have virtual storage of up to 263 Bytes.

The resulting available storage is called virtual storage.

4 GB

Real Memory

263 B

Virtual Storage

Transformed to

Copyright © Concept Solutions Corporation

11 of 23

Virtual Storage

For our course, it is sufficient to say that the operating system manages the resources that allow you access to memory that is more than your physical memory.

4 GB

Real Memory

8 GB

Virtual Storage

Transformed to

Copyright © Concept Solutions Corporation

12 of 23

Single Virtual Storage

Other operating systems may be able to give you virtual storage, but this virtual storage is allocated among all the tasks in the system.

Let us say you have 1000 tasks running in your system, and your system gives you a virtual storage of 4GB, that 4GB is split between the 1000 tasks running.

This virtual storage is allocated between all the tasks running in the system

Copyright © Concept Solutions Corporation

13 of 23

Multiple Virtual Storage

MVS does not only give you virtual storage, it gives you multiple virtual storage.

If you have 1000 jobs in your system, each of these jobs can theoretically have 263 B of virtual storage!

Each job has its own address space.

4 GB

Virtual Memory

4 GB

Virtual Memory

4 GB

Virtual Memory

8 GB

Virtual Storage

THAT’S A LOT OF STORAGE FOR ONE JOB!!!

Copyright © Concept Solutions Corporation

14 of 23

Multitasking

MVS allows more than one program to execute at any time. This feature is called multitasking.

Multi-tasking is managed by the operating system.

4 GB

Virtual Memory

4 GB

Virtual Memory

4 GB

Virtual Memory

32 GB

Virtual Storage

Copyright © Concept Solutions Corporation

15 of 23

Multitasking

This allows the computer to process more than one program at the same time. On the PC, we see this happening. You may be surfing the web and later, be typing an email while your browser is still open.

On the mainframe, you can have several programs running concurrently. One could be managing your transactions, another could be processing batch jobs while another could be processing your transactions.

This maximizes the use of your computer system.

Manage Transaction

Batch job

Process transaction

MVS System

Copyright © Concept Solutions Corporation

16 of 23

How MVS Manages Work

MVS manages work in Jobs. A job is a single unit of work. It can be made up of several programs executed in sequence.

Jobs are controlled using job control cards. These cards are coded in Job Control Language (JCL).

When working on the mainframe, you will often hear the term JCL.

JCL is referred to the language used to create the job control cards. It is also used to refer to the job control cards itself.

The subsystem that manages the entry and output of jobs is called the Job Entry Subsystem (JES). The more popular job entry subsystem is called JES2.

  • Job
  • JCL
  • JES2

Copyright © Concept Solutions Corporation

17 of 23

Types of Jobs

There are several types of jobs in MVS. All these need JCLs to execute:

  • Started Task (STC)
    • These are tasks that are automatically started by MVS when it starts up or are started by the operators from the MVS console
  • TSO User (TSU)
    • These are jobs that control the interactive sessions of developers. These are started when a user logs on the the MVS system.
  • Batch Job (JOB)
    • These are the regular jobs that are submitted by users through TSO or internally from another job. These require JES2 initiators to execute. These are often called batch jobs.
  • STC
  • TSU
  • Batch JOB

Copyright © Concept Solutions Corporation

18 of 23

Job Control

In the early incarnations of MVS:

  • Input is done using punched cards through a physical card reader.
  • These cards have 80 columns. This is why all JCLs are coded in 80 column records.
  • The cards specify:
    • The sequence of programs to be executed
    • conditions for executing the program
    • The files used by these programs

Today, there are no more physical card readers. JES reads these cards through a logical reader.

Sample punch card

Copyright © Concept Solutions Corporation

19 of 23

Job Entry

  • When a job is submitted:
    • JES checks the JCL for syntax errors
    • If there are no errors, the job is queued in the input queue
  • Every batch jobs has a class and priority

JES2 check for syntax

JCL

Job Input Queue

Submit to JES2

Copyright © Concept Solutions Corporation

20 of 23

JES Initiators

Initiators are controlled by JES2. These are basically system started tasks that look at the input queue and process jobs based on their class.

  • An initiator can process jobs in one or more classes.
  • When an initiator is available, it scans the input queue of a specific class. If there are jobs within that class, the job with the highest priority is executed.
  • If there are no jobs within the class, the initiator is left idle and will wait until there is a job in the classes that it processes.
  • Process jobs based on class

Copyright © Concept Solutions Corporation

21 of 23

Job Initiation

  • If an initiator finds a job in a class that it processes, it will initiate the job
  • When it initiates the job, the initiator will check to make sure that all the files are not on hold. If the files are archived, the initiator will send a request to recall these files so that the job can use it.
  • The initiator sets up the environment for the step to execute.
    • Before it passes control to the program in the step, the initiator will allocate the files used by the program.
      • If files exist and are consistent with what is specified in the JCL, the initiator will proceed to pass control to the program.
      • If there is an error in the file specification, the initiator will terminate processing of the job.

Job Input Queue

Initiator

Initiator

Initiator

Initiator

Initiator

Copyright © Concept Solutions Corporation

22 of 23

Job Execution

  • When control is passed to the program, the program will run.
  • There are three ways the program may end:
    • Normal End. This happens when the program has no errors. It will end with a zero return code.
    • Error. This happens when the program has errors that it can handle. This normally will cause a non-zero return code.
    • Abnormal End (ABEND). This happens when a program encounters an error it cannot handle. Sometimes, the system will cause an ABEND on error conditions.
  • Normal
  • Error
  • ABEND

Copyright © Concept Solutions Corporation

23 of 23

Job Printout

  • In a normal situation, programs will print out reports. In a PC environment, the reports may be printed immediately since the printer is probably used by one person.
  • In a multiple user environment, the reports are placed in a SPOOL.
  • Reports are placed in a class within the SPOOL.
  • Printers are defined to process outputs from specific classes in the SPOOL. Reports are printed once the printers are available.
  • If a report is not printed, it remains in the SPOOL until it is purged.

Program

SPOOL

Output

Copyright © Concept Solutions Corporation