As a systems programmer, from time to time you probably write small utility programs to make your job easier. You might write them in REXX or even Assembler. But have you considered Java*?
Java has become well accepted as an application programming language on z/OS. IBM’s Java Batch Launcher and Toolkit (JZOS) also makes it simple to run Java in batch and provides classes to access various system services. This makes Java a real alternative for system programmer batch utilities.
Java has some major advantages over REXX and Assembler. Built-in libraries like Java Collections simplify programming problems. Portable code means that samples published on the internet for other platforms can be easily adapted to z/OS*. Free and open source libraries provide solutions for common problems. As a result, many problems are more easily solved in Java than other languages on z/OS.
The Collections Framework is possibly the most important tool in the Java toolbox. Two of the most useful collections are the ArrayList and the HashMap. The ArrayList is an array that resizes as required. The HashMap is a collection of items accessed by key.
HashMap simplifies all sorts of tasks. For example, when comparing two lists of items with the same keys (e.g., catalog entries), you can store one list in a HashMap and then compare items from the other list, with no dependency on the order of items. You can also use a HashMap to accumulate statistics by key, which makes calculating group totals simple—again with no requirement that the data be in order.
Other more specialized collections implement sets, queues and stacks as well as other types of lists and maps.
Sample Code and Open Source Libraries
Whatever your problem, chances are that someone else has been there before—but not necessarily on z/OS. The ability to use samples published for other platforms is a great time saver. For example, sending email from z/OS through Gmail, with Transport Layer Security and user authentication took about 30 minutes to implement using samples posted on the internet.
There are also free and open source libraries providing more comprehensive solutions to various common problems. Apache Commons and Google Guava are well-known examples. Why not give Java a try, and see what problems it can solve for you?
For more information, Java on z/OS examples and a Java API for SMF data visit: