Package com.ibm.dbb.build
Class ISPFExec
- java.lang.Object
-
- com.ibm.dbb.build.AbstractExec
-
- com.ibm.dbb.build.AbstractCommandExec
-
- com.ibm.dbb.build.ISPFExec
-
- All Implemented Interfaces:
IExecute
public class ISPFExec extends AbstractCommandExec
Execute an ISPF command Example of usage:ISPFExec exec = new ISPFExec(); exec.setCommand(command); exec.setConfDir(confDir); exec.setLogFile(logFile); exec.addDDStatement("CMDSCP", "USER1.ISPFGWY.EXEC", "RECFM(F,B) LRECL(80) TRACKS SPACE(1,1) DSORG(PS)", false); exec.addDDStatement("IN", "USER1.SOURCE.FILE", "SHR", false); exec.addDDStatement("OUT", "USER1.TARGET.FILE", "SHR", false); exec.setCommand("OCOPY INDD(IN) OUTDD(OUT) TEXT CONVERT(YES) TO1047"); int rc = exec.execute();
-
-
Field Summary
-
Fields inherited from class com.ibm.dbb.build.AbstractCommandExec
CLOSED_PAREN, DDNAME_KEYWORD, DEFAULT_SH_EXEC, DSNAME_KEYWORD, FREE_COMMAND, INTERACTIVE_GATEWAY, ISPF_RETURN_CODE, LEGACY_GATEWAY, OPEN_PAREN, PATH_KEYWORD, SINGLE_QUOTE, SPACE
-
-
Constructor Summary
Constructors Constructor Description ISPFExec()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ISPFExecaccountNumber(java.lang.String accountNumber)Set the account number for the interactive ISPF GatewayISPFExeccommand(java.lang.String command)Sets the TSO/ISPF command to be executedISPFExecconfDir(java.lang.String confDir)Set the configuration directory where runIspf.sh could be foundISPFExecfile(java.lang.String file)Set the file that this command is processing.ISPFExecgatewayType(java.lang.String gatewayType)Set the gateway type for the TSOExec commandISPFExecgroupId(java.lang.String groupId)Set the group ID for the interactive ISPF GatewayISPFExeckeepCommandScript(boolean keepCommandScript)Sets totrueif the REXX command data set should be kept.ISPFExeclogEncoding(java.lang.String logEncoding)Set the encoding for the log file this command createsISPFExeclogFile(java.io.File logFile)Sets the path to the log fileISPFExeclogLevel(int logLevel)Set the log level for the interactive ISPF GatewayISPFExecoptions(java.lang.String options)Set the options to pass to the commandISPFExecprocedureName(java.lang.String procedureName)Set the procedure name for the interactive ISPF GatewayISPFExecregionSize(java.lang.String regionSize)Set the region size for the interactive ISPF GatewayISPFExecresponse(java.lang.String response)Set the response command for the interactive ISPF GatewayISPFExecreuseIspfSession(boolean reuseIspfSession)Sets whether an existing ISPF session should be usedISPFExecshExec(java.lang.String shExec)Sets the path to the Bourne shell executor.-
Methods inherited from class com.ibm.dbb.build.AbstractCommandExec
getAccountNumber, getCommand, getConfDir, getGatewayType, getGroupId, getLogEncoding, getLogFile, getLogLevel, getOptions, getOutput, getProcedureName, getRegionSize, getShExec, isKeepCommandScript, isReuseIspfSession, isWaitingForResponse, setAccountNumber, setCommand, setConfDir, setGatewayType, setGroupId, setKeepCommandScript, setLogEncoding, setLogFile, setLogLevel, setOptions, setProcedureName, setRegionSize, setResponse, setReuseIspfSession, setShExec
-
Methods inherited from class com.ibm.dbb.build.AbstractExec
addAllDDStatements, addDDStatement, addDDStatement, addDDStatment, dd, execute, getDDStatements, getFile, setFile
-
-
-
-
Method Detail
-
shExec
public ISPFExec shExec(java.lang.String shExec)
Sets the path to the Bourne shell executor.- Parameters:
shExec- the path to the Bourne shell executor- Returns:
- this instance
-
command
public ISPFExec command(java.lang.String command)
Sets the TSO/ISPF command to be executed- Parameters:
command- to be executed- Returns:
- this instance
-
options
public ISPFExec options(java.lang.String options)
Set the options to pass to the command- Parameters:
options- the options- Returns:
- this instance
-
confDir
public ISPFExec confDir(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- Returns:
- this instance
-
logFile
public ISPFExec logFile(java.io.File logFile)
Sets the path to the log file- Parameters:
logFile- the path to the log file- Returns:
- this instance
-
reuseIspfSession
public ISPFExec reuseIspfSession(boolean reuseIspfSession)
Sets whether an existing ISPF session should be used- Parameters:
reuseIspfSession-trueto indicate an existing ISPF session should be used- Returns:
- this instance
-
keepCommandScript
public ISPFExec keepCommandScript(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- Returns:
- this instance
-
file
public ISPFExec file(java.lang.String file)
Set the file that this command is processing.- Parameters:
file- the relative path of the file.- Returns:
- this instance
-
logEncoding
public ISPFExec logEncoding(java.lang.String logEncoding)
Set the encoding for the log file this command creates- Parameters:
logEncoding- the encoding to be used for the log file- Returns:
- this instance
-
response
public ISPFExec response(java.lang.String response)
Set the response command for the interactive ISPF Gateway- Parameters:
response- the response for the interactive ISPF Gateway- Returns:
- this instance
-
gatewayType
public ISPFExec gatewayType(java.lang.String gatewayType)
Set the gateway type for the TSOExec command- Parameters:
gatewayType- the ISPF Gateway type to call: "legacy" or "interactive"- Returns:
- this instance
-
procedureName
public ISPFExec procedureName(java.lang.String procedureName)
Set the procedure name for the interactive ISPF Gateway- Parameters:
procedureName- the procedure name used by the interactive ISPF Gateway- Returns:
- this instance
-
accountNumber
public ISPFExec accountNumber(java.lang.String accountNumber)
Set the account number for the interactive ISPF Gateway- Parameters:
accountNumber- the account number used by the interactive ISPF Gateway- Returns:
- this instance
-
groupId
public ISPFExec groupId(java.lang.String groupId)
Set the group ID for the interactive ISPF Gateway- Parameters:
groupId- the group ID used by the interactive ISPF Gateway- Returns:
- this instance
-
regionSize
public ISPFExec regionSize(java.lang.String regionSize)
Set the region size for the interactive ISPF Gateway- Parameters:
regionSize- the region size used by the interactive ISPF Gateway- Returns:
- this instance
-
logLevel
public ISPFExec logLevel(int logLevel)
Set the log level for the interactive ISPF Gateway- Parameters:
logLevel- the log level used by the interactive ISPF Gateway- Returns:
- this instance
-
-