Package com.ibm.dbb.build
Class AbstractExec
- java.lang.Object
-
- com.ibm.dbb.build.AbstractExec
-
- All Implemented Interfaces:
IExecute
- Direct Known Subclasses:
AbstractCommandExec
,MVSExec
public abstract class AbstractExec extends java.lang.Object implements IExecute
Abstract class that implements IExec to execute a command on system z.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description AbstractExec()
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addAllDDStatements(java.util.List<DDStatement> dds)
Concatenates a list of DD statements to the list of DD statements for this commandvoid
addDDStatement(DDStatement dd)
Add a DD statement that will be allocated prior to executing the program and freed once program execution has completed.void
addDDStatement(java.lang.String ddName, java.lang.String dsn, java.lang.String options, boolean pass)
Creates and adds a DD statement that will be allocated prior to executing the program and freed once program execution has completed.void
addDDStatment(java.lang.String ddName, java.lang.String dsn, java.lang.String options, boolean pass)
Deprecated.AbstractExec
dd(DDStatement dd)
Add a DD statement that will be allocated prior to executing the program and freed once program execution has completed.int
execute()
Executes the commandjava.util.List<DDStatement>
getDDStatements()
Retrieves the list of DD statements for this commandjava.lang.String
getFile()
Returns the relative path of the file that this command is processing.void
setFile(java.lang.String file)
Set the file that this command is processing.
-
-
-
Method Detail
-
execute
public final int execute() throws BuildException
Executes the command- Specified by:
execute
in interfaceIExecute
- Returns:
- The integer RC from the z/OS executed program.
- Throws:
BuildException
- if an error occurs during the execution
-
addDDStatement
public void addDDStatement(DDStatement dd) throws BuildException
Add a DD statement that will be allocated prior to executing the program and freed once program execution has completed.- Parameters:
dd
- The DD statement to add.- Throws:
BuildException
- an exception occurred- See Also:
DDStatement
-
addDDStatment
public void addDDStatment(java.lang.String ddName, java.lang.String dsn, java.lang.String options, boolean pass) throws BuildException
Deprecated.Creates and adds a DD statement that will be allocated prior to executing the program and freed once program execution has completed.- Parameters:
ddName
- The name of the DD statement to add. Required.dsn
- The dataset name of the DD statement to add. Optional if the DD statement is for a temporary dataset.options
- BPXWDYN allocation options. Required. See BPXWDYN: Dynamic Allocationpass
- True if the DD is to be passed to another MVSExec statement so is not freed at. Optional, default is false.- Throws:
BuildException
- an exception occurred- See Also:
DDStatement
-
addDDStatement
public void addDDStatement(java.lang.String ddName, java.lang.String dsn, java.lang.String options, boolean pass) throws BuildException
Creates and adds a DD statement that will be allocated prior to executing the program and freed once program execution has completed.- Parameters:
ddName
- The name of the DD statement to add. Required.dsn
- The dataset name of the DD statement to add. Optional if the DD statement is for a temporary dataset.options
- BPXWDYN allocation options. Required. See BPXWDYN: Dynamic Allocationpass
- True if the DD is to be passed to another MVSExec statement so is not freed at. Optional, default is false.- Throws:
BuildException
- an exception occurred- See Also:
DDStatement
-
addAllDDStatements
public void addAllDDStatements(java.util.List<DDStatement> dds) throws BuildException
Concatenates a list of DD statements to the list of DD statements for this command- Parameters:
dds
- List of DD statements- Throws:
BuildException
- an exception occurred- See Also:
DDStatement
-
getDDStatements
public java.util.List<DDStatement> getDDStatements()
Retrieves the list of DD statements for this command- Returns:
- List of DD statements
- See Also:
DDStatement
-
setFile
public void setFile(java.lang.String file)
Set the file that this command is processing.- Parameters:
file
- the relative path of the file.
-
getFile
public java.lang.String getFile()
Returns the relative path of the file that this command is processing.- Returns:
- the relative path of the file.
-
dd
public AbstractExec dd(DDStatement dd) throws BuildException
Add a DD statement that will be allocated prior to executing the program and freed once program execution has completed.- Parameters:
dd
- The DD statement to add.- Returns:
- this instance
- Throws:
BuildException
- an exception occurred- See Also:
DDStatement
-
-