Provides access to MAINVIEW views over a network. This package allows a Java program to retrieve data from any MVI-3 BMC product. The first step is to create a session by connecting to a host server running on a z/OS mainframe:
      HostServer host = new LiveServer(logger, hostName, ipAddress, port, userID, password);
      host.connect();
Then a series of conversations can be initiated to retrieve view definitions and view contents:
        ViewDefinition myView = new ViewDefinition("MYVIEW");
        myView.setProduct("MYPRODUCT");
        Conversation  conv = host.conversationFactory();
        Vector targets = host.loadTargets(conv, myProduct);
        for (int i = 0; i < targets.size(); i++) {
            ServicePoint sp = (ServicePoint) targets.elementAt(i);
            if (sp.product.equals(myProduct) && sp.status.equals("Active"))
            {
                conv.access(sp);
                TabularView view = new TabularView(myView, conv, true, null);
                Field myField = view.getField("MYFIELD");
                for (int j = 0; j < view.size(); j++) {
                   String data = view.getValue(j, myField);
                   /* Process a data item */
                }
            }
        }
        conv.close();

Lower level control

For control at a lower, more detailed level, the following methods of Conversation may also be used:

Event processing

Conversation Events

During processing the Conversation object will create a number of ConversationEvents. One or more ConversationListener may be added to react to them. Each time that a request is processed, here is the sequence of events.

  1. Build the XML object - ConversationXMLOutEvent
  2. Convert to text - ConversationRawOutEvent
  3. Send the text, receive a response - ConversationRawInEvent
  4. Parse the response - ConversationXMLInEvent
  5. Process the status information and retrieve messages - ConversationStatusEvent

View Processing Events

During the processing of a View object a series of events are created. A ViewListener object may be passed to the constructor to react to these events. Here is the sequence of event types:

  1. Set the conversation to use the view - ViewListener.VIEWSET
  2. Retrieve the view definition - ViewListener.GOTFIELDS
  3. Prepare to retrieve data from the host - ViewListener.REFRESHING

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see: