|  |
Console Command Generator for z/OS
An easy-to-use API that enables C/C++ and Java programs to issue z/OS Console commands and retrieve the responses.
Date Posted: November 12, 2004
|
|
 |
 |
|
What is Console Command Generator for z/OS?
Console Command Generator for z/OS is an easy-to-use API that enables C/C++ and Java™ programs to issue z/OS Console commands and retrieve the responses.
The module containing the API can be dynamically loaded by the program needing it. This is done either implicitly (in case of the Java interface) or is explicitly coded according to the included C/C++ sample code. The API uses the macros MCSOPER, MCSOPMSG, and MGCRE, available from the IBM z/OS Authorized Assembler Program, to create a z/OS user console, issue commands, and read from the console.
The following C/C++ interfaces are available:
- consoleCreate: Allocates internal structures and creates a user console
- consoleCommand: Issues the command and retrieves the results. Results are collected until a timeout expires or when specifiable end conditions are met, such as when certain messages are detected.
- consoleDelete: Closes the user console and frees internal resources.
On top of the C/C++ interface, JNI (Java Native Interface) functions enable access to the API from Java code; for example:
- methods for setting the user console name, timeout, and end conditions
- methods for issuing z/OS commands
- methods for retrieving command responses
- a Java class that encapsulates the above function.
How does it work? The most currently used programming languages for new applications are Java and C/C++. However, most of the interfaces in z/OS are available only for Assembler programs. Therefore, the z/OS command generator provides pieces of code that provide an easily-used, high-level API for accessing z/OS system functions. With the command generator, it is no longer necessary to bother with z/OS macros; instead, one can issue a z/OS console command as easily as calling a Java or C/C++ function.
|
|
 |

|  | About the technology author(s):
Thomas Starz joined IBM in 1986 as a software developer. He contributed to several products, mainly developing system software. Currently, Mr. Starz works in the area of system provisioning for various platforms.
|
| Michael Mey was an intern at IBM Research in Boeblingen, Germany, in 2004.
|
| |
|
| |
|