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

Module 4: MVS System Internals


MVS- System Internals

System internals explains what happens behind the scenes: how a job moves through JES, what an initiator does, how paging works, and how SMF records everything.

This page is written at intermediate depth - enough to read job output, understand waits, and talk to operations and systems programmers.

JES2 and JES3

  • JES = Job Entry Subsystem. It handles batch jobs from submission to output.
  • JES receives the job, queues it, presents it to MVS for execution, and routes the spooled output.
  • There are two versions: JES2 and JES3. They are incompatible with each other.
  • A shop installs only one of them, so learn which one your site uses.

How a job enters the system

  • You write JCL in an editor and issue the SUBMIT (SUB) command.
  • JES reads the job stream from the data set and copies it to the job queue on the JES spool.
  • From then on, the job is tracked by its job name and job number.

Job scheduling: classes and priorities

  • Jobs are not run in submission order. JES picks the most important jobs first.
  • Job class (one character, A-Z, 0-9) groups jobs by their processing needs. Class is more important than priority.
  • Priority is a number within the class; higher-priority jobs run first.
  • Each shop defines its own classes, for example by expected CPU time and output size.

Initiators

  • An initiator is a program that runs in an address space eligible for batch processing.
  • Each initiator handles one job at a time.
  • The initiator looks at the JES spool, selects a job of its classes, runs it in its address space, then takes the next job.
  • Each initiator is assigned one or more job classes and only runs jobs from those classes.
  • Within a class, jobs run in priority order.

How a job is executed

  • The JCL interpreter (converter) checks the JCL and builds control blocks.
  • The initiator allocates the data sets, devices, and storage the job needs.
  • The user program runs in the private area of the initiator's address space.
  • When the job ends, the initiator deallocates everything and picks up the next job.
//PAYJOB JOB (ACCT),'PAYROLL RUN',CLASS=B,MSGCLASS=X, // NOTIFY=&SYSUID //STEP1 EXEC PGM=PAYPGM,REGION=0M //STEPLIB DD DSN=MYID.PAY.LOADLIB,DISP=SHR //SYSIN DD * 2026-10,REGULAR 2026-10,BONUS /* //SYSPRINT DD SYSOUT=* //PAYRPT DD SYSOUT=A

SYSIN and SYSOUT data sets

  • SYSIN (in-stream data): input data coded inside the job stream after a DD * statement. JES stores it on the spool.
  • SYSOUT: program output written as if to a printer. JES holds it on the spool until it is printed or viewed.
  • SYSOUT=* means: use the MSGCLASS of the JOB statement.

The SYSOUT data sets of a job

  • JESMSGLG: the JES message log - messages from JES as the job ran.
  • JESJCL: the listing of the JCL after the converter processed it.
  • JESYSMSG: system messages produced by MVS during the job.
  • Plus one SYSOUT data set per program output DD statement.
  • Output class A is normal printer output; B is special output; X is held output that stays on the queue until released or deleted.
  • View all of these with SDSF (System Display and Search Facility).

Virtual storage and paging

  • Virtual storage is divided into 4 KB pages.
  • A block of real storage is a frame. A block of auxiliary storage (on disk) is a slot.
  • A page, a frame, and a slot are all the same size: 4096 bytes.
  • Page-in moves a page from a slot to a frame; page-out moves it back.
  • Dynamic Address Translation (DAT) converts virtual addresses to real addresses using hardware tables.
  • When frames run low, the system steals pages that have not been used recently (page stealing).

Swapping

  • Swapping moves a whole address space in or out of real storage.
  • A swapped-in address space is active and can run. A swapped-out address space waits on auxiliary storage.
  • Special swap data sets hold the pages of swapped-out address spaces.
  • Swapping balances the workload when memory is tight.
  • Programs that must always stay in memory are called resident.

SMF: System Management Facilities

  • SMF records what the system does: job accounting, performance, and resource usage.
  • Each event writes an SMF record with a type number, for example:
  • Type 4 / 5: job step end / job end (CPU time, start and end times).
  • Type 14 / 15: data set open and close activity.
  • Type 30: common address space work (the modern replacement for types 4, 5, 34, 35).
  • Installations use SMF data for chargeback (billing departments for usage) and performance tuning.
  • SMF records are usually dumped to data sets and processed by reporting tools.

Address space layout

  • Each address space has a private area (the user's program and data) and a common area (shared system code).
  • The common area holds the nucleus, SQA, CSA, and the link pack area (LPA).
  • The private area holds the user region, LSQA, and SWA.
  • System address spaces are started at IPL for the master scheduler and subsystems.
  • TSO/E creates one address space per logged-on user; batch creates one per job.

Key subsystems and facilities

  • TSO/E: lets terminal users work interactively, each in their own address space.
  • ISPF: full-screen editor and utilities running under TSO/E.
  • VTAM: controls terminal and network communication (part of SNA).
  • CICS: runs online transaction programs in its own address space.
  • DB2: relational database manager, accessed with SQL.
  • RACF: security - controls who can access data sets and facilities.
  • SMS: automates storage management (data class, storage class, management class).
  • WLM: sets performance goals and gives resources to the most important work first.





© copyright mainframebug.com
Privacy Policy
MainframeBug Assistant