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 charCLOSED_PARENstatic java.lang.StringDDNAME_KEYWORDstatic java.lang.StringDEFAULT_SH_EXECThe default location to the BOURNE exec.static java.lang.StringDSNAME_KEYWORDstatic java.lang.StringFREE_COMMANDstatic java.lang.StringINTERACTIVE_GATEWAYConstant for the ISPF Interactive Gatewaystatic java.lang.StringISPF_RETURN_CODEInternal use to retrieve the RC returned from running the commandstatic java.lang.StringLEGACY_GATEWAYConstant for the ISPF Legacy Gatewaystatic charOPEN_PARENstatic java.lang.StringPATH_KEYWORDstatic charSINGLE_QUOTEstatic charSPACE
-
Constructor Summary
Constructors Constructor Description AbstractCommandExec()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAccountNumber()Get the account number for the interactive ISPF Gatewayjava.lang.StringgetCommand()Returns the TSO/ISPF command to be executedjava.lang.StringgetConfDir()Returns the configuration directory where runIspf.sh could be foundjava.lang.StringgetGatewayType()Get the gateway type for the TSOExec commandjava.lang.StringgetGroupId()Get the group ID for the interactive ISPF Gatewayjava.lang.StringgetLogEncoding()Returns the encoding of the log filejava.io.FilegetLogFile()Returns the path to the log fileintgetLogLevel()Get the log level for the interactive ISPF Gatewayjava.lang.StringgetOptions()Retrieve the options to pass to the commandjava.lang.StringgetOutput()Returns the output from the ISPF commandjava.lang.StringgetProcedureName()Get the procedure name for the interactive ISPF Gatewayjava.lang.StringgetRegionSize()Get the region size for the interactive ISPF Gatewayjava.lang.StringgetShExec()Returns the path to the Bourne shell executorbooleanisKeepCommandScript()Returnstrueif REXX command data set should be kept after execution.booleanisReuseIspfSession()Returnstrueif an existing ISPF session should be reusedbooleanisWaitingForResponse()Returns whether or not the ISPFExec or TSOExec is expecting a responsevoidsetAccountNumber(java.lang.String accountNumber)Set the account number for the interactive ISPF GatewayvoidsetCommand(java.lang.String command)Sets the TSO/ISPF command to be executedvoidsetConfDir(java.lang.String confDir)Set the configuration directory where runIspf.sh could be foundvoidsetGatewayType(java.lang.String gatewayType)Set the gateway type for the TSOExec commandvoidsetGroupId(java.lang.String groupId)Set the group ID for the interactive ISPF GatewayvoidsetKeepCommandScript(boolean keepCommandScript)Sets totrueif the REXX command data set should be kept.voidsetLogEncoding(java.lang.String logEncoding)Sets the log encodingvoidsetLogFile(java.io.File logFile)Sets the path to the log filevoidsetLogLevel(int logLevel)Set the log level for the interactive ISPF GatewayvoidsetOptions(java.lang.String options)Set the options to pass to the commandvoidsetProcedureName(java.lang.String procedureName)Set the procedure name for the interactive ISPF GatewayvoidsetRegionSize(java.lang.String regionSize)Set the region size for the interactive ISPF GatewayvoidsetResponse(java.lang.String response)Sets the response command for the interactive ISPF GatewayvoidsetReuseIspfSession(boolean reuseIspfSession)Sets whether an existing ISPF session should be usedvoidsetShExec(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()
Returnstrueif an existing ISPF session should be reused- Returns:
trueif an existing ISPF session should be reused
-
setReuseIspfSession
public void setReuseIspfSession(boolean reuseIspfSession)
Sets whether an existing ISPF session should be used- Parameters:
reuseIspfSession-trueto indicate an existing ISPF session should be used
-
setKeepCommandScript
public void setKeepCommandScript(boolean keepCommandScript)
Sets totrueif the REXX command data set should be kept. By default this data set will be deleted after execution- Parameters:
keepCommandScript-trueif the REXX command data set should be kept
-
isKeepCommandScript
public boolean isKeepCommandScript()
Returnstrueif REXX command data set should be kept after execution.- Returns:
trueif the REXX command data set should be kep after execution.
-
-