public class MVSJob
extends java.lang.Object
addExecutable(IExecutable)
and execute()
methods to load and execute a list of
executable commands.
start()
and stop()
methods to wrap any set of arbitrary code statements that contain MVSExec commands
MVSExec
Constructor and Description |
---|
MVSJob()
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addExecutable(IExecute executable)
Adds an executable (
IExecutable ) to the list of executables to run. |
MVSJob |
executable(IExecute executable)
Execute a command
|
int |
execute()
Executes the list of commands that were added using the
addExecutable() method, cleaning
up any passed DD statements at the end of the run. |
java.util.List<IExecute> |
getExecutables()
Return a list of commands to be executed
|
int |
getFailedStepNumber()
Retrieve the index of the commands failed to execute
|
int |
getMaxRC()
Retrieve the expected maximum return code
|
MVSJob |
maxRC(int maxRC)
Set the maximum return code allowed during the
execute method |
void |
setExecutables(java.util.List<IExecute> executables)
Sets the list of executables to run
|
void |
setMaxRC(int maxRC)
Set the maximum return code allowed during the
execute method |
void |
start()
Starts collecting passed DD statements from MVSExec commands for freeing later.
|
void |
stop()
Stops collecting passed DD statements and frees all that has been collected.
|
public void start()
public void stop()
public int execute() throws BuildException
addExecutable()
method, cleaning
up any passed DD statements at the end of the run.
If any executable exceeds the max RC (if set) then further execution is halted and the RC of the last
executable to run is returned. Use getFailedStepNumber()
to identify which executable failed.BuildException
- an exception occurredpublic java.util.List<IExecute> getExecutables()
public void setExecutables(java.util.List<IExecute> executables)
executables
- The list of executables to runpublic void addExecutable(IExecute executable)
IExecutable
) to the list of executables to run.executable
- The executable to runpublic int getMaxRC()
public int getFailedStepNumber()
public void setMaxRC(int maxRC)
execute
methodmaxRC
- The maximum return code allowedpublic MVSJob executable(IExecute executable)
executable
- the command to be executedpublic MVSJob maxRC(int maxRC)
execute
methodmaxRC
- The maximum return code allowed<IBM Copyright © 2018 IBM Corp. All Rights Reserved.