VSE provides many different methods of process automation; some of them have been around for decades in the traditional mainframe world and involve JCL, timeevent scheduling, VM, rEXX, and various OEM products. In contrast to that, new functionality is provided in the open world and can be used in a VSE environment with surprisingly little effort. One example is the open source software project, Ant, which provides a Java-based build tool. On the basis of the VSE Java-based connector, Ant scripts can be used to submit jobs, enter operator console commands, and upload and download files.
What Is Apache Ant?
Apache Ant is a command line-based build tool that provides similar functionality as “make” for C and C++ programs. However, Ant is written in Java and build scripts are written in XML.
Because Java and XML are platformindependent, Ant itself becomes platform- independent. Ant build files executed on a Unix system behave exactly as they do on a Windows PC, even if they include file system commands such as copying or deleting files and directories.
Ant Build Files
A single Ant build script is called an Ant project. The project is divided into different targets that contain one or more tasks. The tasks do the actual work of accomplishing typical Ant goals such as compiling Java code, replacing strings in files, or sending a distributable via File Transfer Protocol (FTP) to a server. Figure 1 shows the overall structure of an Ant build script.
Targets are logical sets of tasks. A target usually depends on other targets; this allows for chaining of targets. A typical VSE example for an Ant target is batch workload processing. It would include a first task for shutting down CICS, a second task for submitting some batch jobs, and a third task for bringing up CICS again (depending on successful completion of the batch jobs).
How Ant Is Linked to vSE
Ant provides a Java Application Program Interface (API) for adding new tasks to the core Ant run-time environment. Implementing VSE-specific Ant tasks for accessing VSE data and functions via the VSE Java-based connector make Ant useful for all kinds of functionality the VSE connector provides.