Package com.ibm.dbb.build
Class AbstractCommandExec
- java.lang.Object
-
- com.ibm.dbb.build.AbstractExec
-
- com.ibm.dbb.build.AbstractCommandExec
-
- All Implemented Interfaces:
IExecute
public abstract class AbstractCommandExec extends AbstractExec
Performs non-MVS commands, for example: TSO or ISPF commands.
-
-
Field Summary
Fields Modifier and Type Field Description static char
CLOSED_PAREN
static java.lang.String
DDNAME_KEYWORD
static java.lang.String
DEFAULT_SH_EXEC
The default location to the BOURNE exec.static java.lang.String
DSNAME_KEYWORD
static java.lang.String
FREE_COMMAND
static java.lang.String
INTERACTIVE_GATEWAY
Constant for the ISPF Interactive Gatewaystatic java.lang.String
ISPF_RETURN_CODE
Internal use to retrieve the RC returned from running the commandstatic java.lang.String
LEGACY_GATEWAY
Constant for the ISPF Legacy Gatewaystatic char
OPEN_PAREN
static java.lang.String
PATH_KEYWORD
static char
SINGLE_QUOTE
static char
SPACE
-
Constructor Summary
Constructors Constructor Description AbstractCommandExec()
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAccountNumber()
Get the account number for the interactive ISPF Gatewayjava.lang.String
getCommand()
Returns the TSO/ISPF command to be executedjava.lang.String
getConfDir()
Returns the configuration directory where runIspf.sh could be foundjava.lang.String
getGatewayType()
Get the gateway type for the TSOExec commandjava.lang.String
getGroupId()
Get the group ID for the interactive ISPF Gatewayjava.lang.String
getLogEncoding()
Returns the encoding of the log filejava.io.File
getLogFile()
Returns the path to the log fileint
getLogLevel()
Get the log level for the interactive ISPF Gatewayjava.lang.String
getOptions()
Retrieve the options to pass to the commandjava.lang.String
getOutput()
Returns the output from the ISPF commandjava.lang.String
getProcedureName()
Get the procedure name for the interactive ISPF Gatewayjava.lang.String
getRegionSize()
Get the region size for the interactive ISPF Gatewayjava.lang.String
getShExec()
Returns the path to the Bourne shell executorboolean
isKeepCommandScript()
Returnstrue
if REXX command data set should be kept after execution.boolean
isReuseIspfSession()
Returnstrue
if an existing ISPF session should be reusedboolean
isWaitingForResponse()
Returns whether or not the ISPFExec or TSOExec is expecting a responsevoid
setAccountNumber(java.lang.String accountNumber)
Set the account number for the interactive ISPF Gatewayvoid
setCommand(java.lang.String command)
Sets the TSO/ISPF command to be executedvoid
setConfDir(java.lang.String confDir)
Set the configuration directory where runIspf.sh could be foundvoid
setGatewayType(java.lang.String gatewayType)
Set the gateway type for the TSOExec commandvoid
setGroupId(java.lang.String groupId)
Set the group ID for the interactive ISPF Gatewayvoid
setKeepCommandScript(boolean keepCommandScript)
Sets totrue
if the REXX command data set should be kept.void
setLogEncoding(java.lang.String logEncoding)
Sets the log encodingvoid
setLogFile(java.io.File logFile)
Sets the path to the log filevoid
setLogLevel(int logLevel)
Set the log level for the interactive ISPF Gatewayvoid
setOptions(java.lang.String options)
Set the options to pass to the commandvoid
setProcedureName(java.lang.String procedureName)
Set the procedure name for the interactive ISPF Gatewayvoid
setRegionSize(java.lang.String regionSize)
Set the region size for the interactive ISPF Gatewayvoid
setResponse(java.lang.String response)
Sets the response command for the interactive ISPF Gatewayvoid
setReuseIspfSession(boolean reuseIspfSession)
Sets whether an existing ISPF session should be usedvoid
setShExec(java.lang.String shExec)
Sets the path to the Bourne shell executor.-
Methods inherited from class com.ibm.dbb.build.AbstractExec
addAllDDStatements, addDDStatement, addDDStatement, addDDStatment, dd, execute, getDDStatements, getFile, setFile
-
-
-
-
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
-
FREE_COMMAND
public static final java.lang.String FREE_COMMAND
- See Also:
- Constant Field Values
-
DDNAME_KEYWORD
public static final java.lang.String DDNAME_KEYWORD
- See Also:
- Constant Field Values
-
DSNAME_KEYWORD
public static final java.lang.String DSNAME_KEYWORD
- See Also:
- Constant Field Values
-
PATH_KEYWORD
public static final java.lang.String PATH_KEYWORD
- See Also:
- Constant Field Values
-
SPACE
public static final char SPACE
- See Also:
- Constant Field Values
-
OPEN_PAREN
public static final char OPEN_PAREN
- See Also:
- Constant Field Values
-
CLOSED_PAREN
public static final char CLOSED_PAREN
- See Also:
- Constant Field Values
-
SINGLE_QUOTE
public static final char SINGLE_QUOTE
- See Also:
- Constant Field Values
-
-
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()
Returnstrue
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 totrue
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()
Returnstrue
if REXX command data set should be kept after execution.- Returns:
true
if the REXX command data set should be kep after execution.
-
-