Interface ITSOCommandProvider


  • public interface ITSOCommandProvider
    Command provider for TSO related functions.

    Examples:
    To obtain an ITSOCommandProvider:

     IZOSHostConnection zosHostConnection = ...
     
     // get the TSO command provider from a z/OS host connection
     // note: the command provider will only be usable while the z/OS host
     // connection is connected to its z/OS host
     ITSOCommandProvider commandProvider = zosHostConnection
             .getTSOCommandProvider();
     
    To submit a TSO command
     ITSOCommandProvider commandProvider = ...
     
     try {
         // submit the command
         ITSOCommandResult commandResult = commandProvider.submitTSOCommand(command);
     } catch (TopazAPIRuntimeException e) {
         // An error occurred submitting or executing the command
         ...
     }
     
    Since:
    2.2.0
    Version:
    2.2.0
    See Also:
    IZOSHostConnection, ITSOCommandResult
    Restriction:
    This interface is not intended to be extended by clients.
    Restriction:
    This interface is not intended to be implemented by clients.
    • Method Detail

      • submitTSOCommand

        ITSOCommandResult submitTSOCommand​(String command)
        Submit a TSO command for execution on the connected mainframe.
        Parameters:
        command - String containing the TSO command to be executed
        Returns:
        ITSOCommandResult containing the commands output
        Throws:
        TopazAPIRuntimeException - if any error occurs
        Since:
        2.2.0
      • getZOSHostConnection

        IZOSHostConnection getZOSHostConnection()
        Returns the z/OS host connection associated with this command provider.
        Returns:
        the z/OS host connection
        Since:
        2.2.0