com.ibm.dbb.build

Class AbstractCommandExec

  • All Implemented Interfaces:
    IExecute
    Direct Known Subclasses:
    ISPFExec, TSOExec


    public abstract class AbstractCommandExec
    extends AbstractExec
    Performs non-MVS commands, for example: TSO or ISPF commands.
    • Constructor Summary

      Constructors 
      Constructor and Description
      AbstractCommandExec()
      Default constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getAccountNumber()
      Get the account number for the interactive ISPF Gateway
      java.lang.String getCommand()
      Returns the TSO/ISPF command to be executed
      java.lang.String getConfDir()
      Returns the configuration directory where runIspf.sh could be found
      java.lang.String getGatewayType()
      Get the gateway type for the TSOExec command
      java.lang.String getGroupId()
      Get the group ID for the interactive ISPF Gateway
      java.lang.String getLogEncoding()
      Returns the encoding of the log file
      java.io.File getLogFile()
      Returns the path to the log file
      int getLogLevel()
      Get the log level for the interactive ISPF Gateway
      java.lang.String getOptions()
      Retrieve the options to pass to the command
      java.lang.String getOutput()
      Returns the output from the ISPF command
      java.lang.String getProcedureName()
      Get the procedure name for the interactive ISPF Gateway
      java.lang.String getRegionSize()
      Get the region size for the interactive ISPF Gateway
      java.lang.String getShExec()
      Returns the path to the Bourne shell executor
      boolean isKeepCommandScript()
      Returns true if REXX command data set should be kept after execution.
      boolean isReuseIspfSession()
      Returns true if an existing ISPF session should be reused
      boolean isWaitingForResponse()
      Returns whether or not the ISPFExec or TSOExec is expecting a response
      void setAccountNumber(java.lang.String accountNumber)
      Set the account number for the interactive ISPF Gateway
      void setCommand(java.lang.String command)
      Sets the TSO/ISPF command to be executed
      void setConfDir(java.lang.String confDir)
      Set the configuration directory where runIspf.sh could be found
      void setGatewayType(java.lang.String gatewayType)
      Set the gateway type for the TSOExec command
      void setGroupId(java.lang.String groupId)
      Set the group ID for the interactive ISPF Gateway
      void setKeepCommandScript(boolean keepCommandScript)
      Sets to true if the REXX command data set should be kept.
      void setLogEncoding(java.lang.String logEncoding)
      Sets the log encoding
      void setLogFile(java.io.File logFile)
      Sets the path to the log file
      void setLogLevel(int logLevel)
      Set the log level for the interactive ISPF Gateway
      void setOptions(java.lang.String options)
      Set the options to pass to the command
      void setProcedureName(java.lang.String procedureName)
      Set the procedure name for the interactive ISPF Gateway
      void setRegionSize(java.lang.String regionSize)
      Set the region size for the interactive ISPF Gateway
      void setResponse(java.lang.String response)
      Sets the response command for the interactive ISPF Gateway
      void setReuseIspfSession(boolean reuseIspfSession)
      Sets whether an existing ISPF session should be used
      void setShExec(java.lang.String shExec)
      Sets the path to the Bourne shell executor.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_SH_EXEC

        public static final java.lang.String DEFAULT_SH_EXEC
        The default location to the BOURNE exec. DBB invokes ISPZXML from a shell script.
        See Also:
        Constant Field Values
      • ISPF_RETURN_CODE

        public static final java.lang.String ISPF_RETURN_CODE
        Internal use to retrieve the RC returned from running the command
        See Also:
        Constant Field Values
      • INTERACTIVE_GATEWAY

        public static final java.lang.String INTERACTIVE_GATEWAY
        Constant for the ISPF Interactive Gateway
        See Also:
        Constant Field Values
      • LEGACY_GATEWAY

        public static final java.lang.String LEGACY_GATEWAY
        Constant for the ISPF Legacy Gateway
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractCommandExec

        public AbstractCommandExec()
        Default constructor
    • Method Detail

      • getShExec

        public java.lang.String getShExec()
        Returns the path to the Bourne shell executor
        Returns:
        the path to the Bourne shell executor
      • setShExec

        public void setShExec(java.lang.String shExec)
        Sets the path to the Bourne shell executor.
        Parameters:
        shExec - the path to the Bourne shell executor
      • getCommand

        public java.lang.String getCommand()
        Returns the TSO/ISPF command to be executed
        Returns:
        the TSO/ISPF command to be executed
      • setCommand

        public void setCommand(java.lang.String command)
        Sets the TSO/ISPF command to be executed
        Parameters:
        command - to be executed
      • getOptions

        public java.lang.String getOptions()
        Retrieve the options to pass to the command
        Returns:
        the options
      • setOptions

        public void setOptions(java.lang.String options)
        Set the options to pass to the command
        Parameters:
        options - the options
      • getConfDir

        public java.lang.String getConfDir()
        Returns the configuration directory where runIspf.sh could be found
        Returns:
        the configuration directory where runIspf.sh could be found
      • setConfDir

        public void setConfDir(java.lang.String confDir)
        Set the configuration directory where runIspf.sh could be found
        Parameters:
        confDir - the configuration directory where runIspf.sh could be found
      • getLogFile

        public java.io.File getLogFile()
        Returns the path to the log file
        Returns:
        the path to the log file
      • setLogFile

        public void setLogFile(java.io.File logFile)
        Sets the path to the log file
        Parameters:
        logFile - the path to the log file
      • getLogEncoding

        public java.lang.String getLogEncoding()
        Returns the encoding of the log file
        Returns:
        the encoding of the log file
      • setLogEncoding

        public void setLogEncoding(java.lang.String logEncoding)
        Sets the log encoding
        Parameters:
        logEncoding - the encoding to be used by the log file
      • setResponse

        public void setResponse(java.lang.String response)
        Sets the response command for the interactive ISPF Gateway
        Parameters:
        response - command
      • setGatewayType

        public void setGatewayType(java.lang.String gatewayType)
        Set the gateway type for the TSOExec command
        Parameters:
        gatewayType - the ISPF Gateway type to call: "legacy" or "interactive"
      • setProcedureName

        public void setProcedureName(java.lang.String procedureName)
        Set the procedure name for the interactive ISPF Gateway
        Parameters:
        procedureName - the procedure name used by the interactive ISPF Gateway
      • setAccountNumber

        public void setAccountNumber(java.lang.String accountNumber)
        Set the account number for the interactive ISPF Gateway
        Parameters:
        accountNumber - the account number used by the interactive ISPF Gateway
      • setGroupId

        public void setGroupId(java.lang.String groupId)
        Set the group ID for the interactive ISPF Gateway
        Parameters:
        groupId - the group ID used by the interactive ISPF Gateway
      • setRegionSize

        public void setRegionSize(java.lang.String regionSize)
        Set the region size for the interactive ISPF Gateway
        Parameters:
        regionSize - the region size used by the interactive ISPF Gateway
      • setLogLevel

        public void setLogLevel(int logLevel)
        Set the log level for the interactive ISPF Gateway
        Parameters:
        logLevel - the log level used by the interactive ISPF Gateway
      • getGatewayType

        public java.lang.String getGatewayType()
        Get the gateway type for the TSOExec command
        Returns:
        the ISPF Gateway type to call: "legacy" or "interactive"
      • getProcedureName

        public java.lang.String getProcedureName()
        Get the procedure name for the interactive ISPF Gateway
        Returns:
        the procedure name used by the interactive ISPF Gateway
      • getAccountNumber

        public java.lang.String getAccountNumber()
        Get the account number for the interactive ISPF Gateway
        Returns:
        the account number used by the interactive ISPF Gateway
      • getGroupId

        public java.lang.String getGroupId()
        Get the group ID for the interactive ISPF Gateway
        Returns:
        the group ID used by the interactive ISPF Gateway
      • getRegionSize

        public java.lang.String getRegionSize()
        Get the region size for the interactive ISPF Gateway
        Returns:
        the region size used by the interactive ISPF Gateway
      • getLogLevel

        public int getLogLevel()
        Get the log level for the interactive ISPF Gateway
        Returns:
        the log level used by the interactive ISPF Gateway
      • getOutput

        public java.lang.String getOutput()
        Returns the output from the ISPF command
        Returns:
        the contents of the getOutput tag from the log
      • isWaitingForResponse

        public boolean isWaitingForResponse()
        Returns whether or not the ISPFExec or TSOExec is expecting a response
        Returns:
        hasPrompt
      • isReuseIspfSession

        public boolean isReuseIspfSession()
        Returns true if an existing ISPF session should be reused
        Returns:
        true if an existing ISPF session should be reused
      • setReuseIspfSession

        public void setReuseIspfSession(boolean reuseIspfSession)
        Sets whether an existing ISPF session should be used
        Parameters:
        reuseIspfSession - true to indicate an existing ISPF session should be used
      • setKeepCommandScript

        public void setKeepCommandScript(boolean keepCommandScript)
        Sets to true if the REXX command data set should be kept. By default this data set will be deleted after execution
        Parameters:
        keepCommandScript - true if the REXX command data set should be kept
      • isKeepCommandScript

        public boolean isKeepCommandScript()
        Returns true if REXX command data set should be kept after execution.
        Returns:
        true if the REXX command data set should be kep after execution.

<IBM Copyright © 2018 IBM Corp. All Rights Reserved.