Question

I am looking for a java API to access mainframe remotely. I am looking for something similar to JTOpen or IBM Toolbox for iseries systems. Through this API, I should be able to connect to the mainframes and fetch information from the mainframe, something like this -

public static void main(String[] args){
    Mainframe myMainframe = new Mainframe(ipAddress, userName, password);
    myMainframe.connect();
    System.out.println(myMainframe.getSystemName);
    myMainframe.disconnect();
}
Was it helpful?

Solution

Look at JMX. It's provide API for building distributed systems. I belive it can be used in your Mainframe environment. It's server-client model. You can write interface like:

public interface MainframeMXBean {
    public String getName();
}

and implement it in your Mainframe class, then create proxy for local usage:

MainframeMXBean remoteMF = JMX.newMXBeanProxy(connection, jmxName, MainFrameMXBean.class);
System.out.println(remoteMF.getName());

OTHER TIPS

The Java Management Extensions (JMX) should be sufficiently widespread and generic to satisfy your need.

Here is an official online example set. Also, you can find an O'Reilly book about it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top