October 10, 2017 | IBM Z

Modernizing your z/OS Batch Environment

image

Batch processing has been around since the rise of business computing, and it is still used in almost every organization to process end of day jobs such as: populating data warehouse systems, interest calculations, electronic transfer posting, archiving historical data at the end of month, creating backups for disaster recovery processes; and others. The nature of batch processing is non-interactive, iterative (perform repetitive logic) and typically processing very large files where response time is not vital (non-office hours).

 

The IBM z/OS operating system has become the prime data server for large companies around the world, mainly because it offers a robust and natural platform for running mission-critical applications in a reliable and secure manner. However, even with these benefits and other technology advances over the years, its batch framework and process logic has remained the same while more contemporary programming languages such as Java, OLTP and others are pushing for a change in the model. A current approach called “Java Batch” is beginning to open new possibilities for Batch modernization with the aim of addressing the following concerns:

  • z/OS batch processing relies on JCL (Job Control Language) to specify the required resources and the execution order for Job steps. JCL is a full-bodied scripting language developed by IBM in the sixties and improved over the years. JCL does not escape from what experts are calling the “IT skills crisis“. Finding staff with a blend of z/OS knowledge is becoming difficult. Java is a programming language growing in popularity and organizations are leveraging their existing Java skills to address other business requirements such as batch processing. In addition there are plentiful Java skills and resources in the marketplace.
  • IT Cost reduction is one of the top business demands and executing batch workloads in Java allows offloading of processing to specialty (less costly) engines such as zAAP.
  • Organizations are looking more to deliver a batch runtime and SOA platform that builds on the services delivered by z/OS Websphere Application Server (WAS) to share business across OLTP and Batch, and facilitate parallel processing for performance.

In 2013, the open standard JSR 352 was released and is defined for both Java EE 7 and Java SE 6 platforms.  Before its publication, Java batch was based on custom code built around JVM launcher and, later, a vendor batch framework. The JSR 352 defines a programming model for batch applications and a batch runtime for executing jobs.  It spells out the programming interfaces, but the implementation is left up to the vendors to provide added value. The following diagram can be found in the JSR 352 documentation and it describes the Batch architecture and the key concepts:

 

 

 

  • A Job compresses all the work related to a specific batch requirement or, in other words, is the logical representation of the work to be done. A Step represents a portion of this work.
  • A Job Specification Language (JSL) to define batch jobs. The Job Specification Language for JSR 352 is implemented with XML and is referred as “Job XML”.
  • A set of interfaces that describe the artifacts that comprise the batch programming model to implement batch business logic (i.e. ItemReader, ItemProcessor, ItemWriter)
  • JobOperator is the interface for job submission and control
  • A batch runtime for running batch jobs
  • A Job Repository that holds information to track Jobs

The majority of the functions are provided by the JSR 352 runtime and by the vendor implementation. The Java developer will first be required to write the code to implement the ItemReader, the ItemProcessor and the ItemWriter; also a Job Specification Language (JSL) file is required. The submission function is at the Job Operator box and is normally supplied by a vendor (e.g. IBM offers a RES interface to JSR 352).

 

The JSR 352 specification defines the following two types of steps:

  • Chuck: traditional batch processing, an iterative loop through a set of data, a common pattern of Read/Process/Write.
  • Batchlet: It’s just a piece of code executed as part of a batch job and not item oriented, e.g. file transfer process.

Summary

The introduction of Java on z/OS has broadened its functionality while supporting new IT demands and lowering processing cost. The development of the standard JSR 352 by the Java community, will allow batch developers to write portable applications across disparate platforms, and as mentioned in this article, the new model also allows developers to focus on their core business logic. The Job Specification Language (JSL) is a standard to execute batch artifacts within a job.