social share alt icon
Thought Leadership
Batch Optimization
November 07, 2022
Batch Optimization
Murali Gajula
Mainframe Practice Architect

How companies that use legacy systems can use the great features of IMS and DB2 for Batch Optimization

Large enterprises have relied on mainframes to manage their most valuable and sensitive data for half a century. Industries like BFSI, Airline, and Pharma still depend on Mainframes to run critical batch applications and process millions of transactions daily. In the BFSI, the batch application that runs on the Mainframe plays a crucial role in updating application records.

The Batch Optimization process plays a crucial role in maintaining the SLAs and SLOs of customers and stakeholders. It helps to improve the performance of the batch applications by reducing the Mainframe application MIPS and minimizing the batch abends.

Here are a few Batch Optimization techniques that can be followed to maintain a healthy Batch system on a legacy system.

Check Point/Restart Commit Point

In DB2 and IMS environments, which handle massive amounts of data, the Checkpoint Restart logic was added to handle job abends during DB2 or IMS DB updates. The IMS DB environment, by default, includes Checkpoint/Restart calls, so there is no need to create explicit tables. Only necessary checkpoint/restart calls and commit point frequencies must be included in IMS programs.

For DB2, we need to create the Restart table and update it for every commit point. While choosing the frequency of Commit points, we need to be careful, as it can significantly impact the performance of the Batch Job. We can analyze the programs that use the Checkpoint/Restart logic, and if the Commit point frequency is 100, it will significantly impact the Job performance. We suggest increasing the Commit point frequency to 1000 to significantly increase the Batch Job performance.

Multi-Row Fetch Technique on DB2 Performance

In the BFSI Sector, some of the critical data has been stored in the DB2 table. However, the older version of the DB2 can only fetch 1 record at a time. To improve the performance of the DB2 programs, the Multi-row FETCH concept was introduced from DB2 Version 8 and above. It can enhance the performance of DB2-based application programs. In Multi-row FETCH, we need to declare the Cursor WITH ROWSET POSITIONING option in DECLARE cursor statement. The FETCH statement with the ROWSET option can fetch more than one record at a time from the table and up to 32767 records. We can suggest a DB2 version upgrade by implementing this feature across all the Cobol-DB2 Programs, thereby reducing the MIPS Cost.

Improve JOB/JCL performance with DATACLAS keyword parameter

The DATACLAS is one of the JCL keyword parameters used for a new data set. This DATACLAS parameter is primarily used by Storage Management System (SMS) to classify and manage the DASD resource by allocating data/business classification and to define the strategy of migration of datasets to ensure space availability. If the new data set is being assigned with more cylinders (ex: more than 1000 Cylinders) in Primary and Secondary quantities, then the DATACLAS parameter would be coded as per the client environment specified value, which will give significant improvement to the batch job performance.

DASD Space Optimization

While allocating the primary and secondary quantities in the SPACE parameter for new data sets, estimate the number of records that will be stored/populated in the new datasets based on the input file/database records and functionality of the program. Kindly follow the below rule for SPACE parameter values for any new datasets in Batch JCL.
Primary Quantity in Cylinders = Number of records stored in the file * File record length /
(56000 * 15)
Secondary Quantity in Cylinders = Primary Quantity in Cylinders/2

Mark unused files as DUMMY in the BATCH programs functionality

Some COBOL/Assembler/PLI programs are still running on Mainframes for the last few years, and some of the files being generated from the batch programs are not used anywhere in the system of applications. Those files can be marked as DUMMY in the batch program functionality or remove the functionality related to those files in the batch programs, which will significantly improve the batch job performance.

Comments
MORE ARTICLES BY THE AUTHOR
RECENT ARTICLES
RELATED ARTICLES