Home > Mainframe MVS > Types of Mainframe Processing: Batch and Online
Types of Mainframe Processing: Batch and Online
User Rating: / 81
Written by Philip L Yuson   

There are two types of mainframe processes: Batch Processing and Online Transaction Processing. Read this article to find out what these are.

Mainframe processing evolved from the 1960's. At that time, processing was mainly read from cards. Outputs were either printed or punched out in cards. Although the input and output devices have changed, this processing is still being used today mainly for processing large amount of data at one time. If an organization needs to print bills, there is most likely a batch program that reads input files and scans through the database and produces the thousands of bills for that billing cycle. This form of processing is called Batch Processing.

As technology improved, online processing became available. Online Transaction Processingallows a user to enter a transaction to a program that can return the result in real time. If you go to an ATM and query your balance, your request is sent to an online program that accepts your query and returns the result in real time.

Batch Processing

MVS Batch Processing

In the old days of computing, batch jobs had statements on punched cards and were physically submitted to the system through a machine called a card reader. One card is one record. Each record is 80 characters in length. These statements are called Job Control cards and written in Job Control Language (JCL). Today, there are no machines to read the punched cards. Statements are now coded interactively with an editor and stored on disks. A program called an internal reader (INTRDR) reads these cards from disks.

The JCL specifies the name of the job (job name), priority and class of the job. It also specifies the STEP within a job. A step is identified by a name (step name) that specifies the program to be executed. The step also specifies the different files used by the program. These file statements specify the attributes of the files being used. The file attributes include the name of the file (Data set nameor DSN), the address of the unit where the file resides, the type of unit, the physical record length (Block Size or BLKSIZE) and logical length (logical record length or LRECL) of each record.

These JCL statements are read by a program called the Job Entry Subsystem (JES). The Job Entry Subsystem for z/OS is called JES2. JES2 is a task within z/OS that puts these jobs in a queue. JES2 controls Initiators. Each Initiator is defined to process one or more job classes. When an Initiator is available, it will process a job based on its class and priority.

Once the job is initiated, batch processing for that job begins. The initiator will allocate the files for the job to use. It will also load the program to be executed for that step. Once the program executes, there is no more intervention needed. The program reads the input files and writes out the output files. When a step is done, the Initiator looks at the next step and based on the condition specified for that step, the Initiator will either bypass that step or will prepare the environment for the next step.

The job ends when all the steps had been executed for that job.

Sometimes, when a program encounters an error condition, the job will terminate with an Abnormal End or (ABEND). There are two kinds of ABENDs. A system ABEND is generated by the operating system. It is prefixed with S and followed by 3 a hexadecimal ABEND code that identifies the cause of the ABEND. A user ABEND is generated by the program and is prefixed with U and followed by 4 decimal numbers.

In z/OS, programs end with a return code. The return code can also indicate the result of the processing for that step. A normal or successful execution normally has a return code of 0.

You may want to read two of my articles on JCL and JES:

Online Transaction Processing

MVS Online Processing

Mainframes also allow for interactive or online transactionprocessing. Online transactionprocessing use online programs to allow a user to enter inputs and receive the response in real time.

These online systems also have JCL statements to control their execution. However, most of them are not classified as batch jobs. These are classified as z/OS system tasks because these are normally started from the system console by an operator. They normally execute under operating system privilege and also are meant to execute while the system is running.

Most online systems have a control region that controls the traffic into and out of the system. Most of them also separate the data layer from the presentation layer. (For those using XML and SOA, does this sound familiar?).

Although there are technologies that now allow for more user-friendly interfaces, most of these interactive systems still display their output in what used to be 3270 terminals. The 3270 terminals were physical visual display units that could only display text in 80 columns and 24 rows. Other models could display 80 columns and 43 rows. These are what some call 'green screen terminals' or 'dumb terminals'. There are probably no 3270 terminals in use today. Most 3270 terminals are emulated on a desktop using emulation software. This page lists various 3270 emulation software.

The way data is to be displayed on the terminal has to be mapped. The mapping process depends on the interactive system used.

The online transaction processing control regions basically accept the data sent from these 3270 terminals and strips off the overhead characters based on the terminal map. The online transaction processing control region will execute the corresponding online program based on the transaction entered. The control region will pass the input to the online program.

The online transaction program will process the input. Processing may involve accessing one or more databases. Once processing is done, the online transaction program will return the result to the online transaction processing control region. The online transaction processing control region will format the output based on the defined terminal map and send the output to the 3270 terminal.

If you wish to know more about online transaction processing, you may want to check my article on: What is an IMS Transaction Manager.

Mainframe Modernization

With mainframe modernization, there are some software products that extend the capability of these online transaction programs. These software products provide interface to web applications and communicate with these online transaction programs. This technique leverages the existing assets and make them more relevant in current business environments. Companies like Progress and IBM have products that do this and have written papers describing their products.

Copyright: © 2017 Philip Yuson