Package com.ibm.dbb.build
Class CreatePDS
- java.lang.Object
-
- com.ibm.dbb.build.CreatePDS
-
- All Implemented Interfaces:
IExecute,com.ibm.dbb.build.internal.DDProcessConstants
public class CreatePDS extends java.lang.Object implements IExecute, com.ibm.dbb.build.internal.DDProcessConstants
This command is used to create partitioned datasets (PDS). Does nothing if the PDS already exists.Usage:
CreatePDS createPDSCmd = new CreatePDS(); createPDSCmd.setDataset(HLQ + "LOAD"); createPDSCmd.setOptions("cyl space(1,1) dsorg(PO) recfm(U) blksize(32760) dsntype(library)"); createPDSCmd.create();This class also supports chaining:new CreatePDS().dataset(HLQ + "LOAD").options("cyl space(1,1) dsorg(PO) recfm(U) blksize(32760) dsntype(library)").create();
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreate()Create a data setCreatePDSdataset(java.lang.String dataset)Set the data set to be allocatedintexecute()Calls the create()java.lang.StringgetDataset()Retrieve the data set to be allocatedjava.lang.StringgetOptions()Retrieve the options to be used to allocate the data setCreatePDSoptions(java.lang.String options)Set the options to be used to allocate the data setvoidsetDataset(java.lang.String dataset)Set the data set to be allocatedvoidsetOptions(java.lang.String options)Set the options to be used to allocate the data set
-
-
-
Constructor Detail
-
CreatePDS
public CreatePDS()
Construct a command to create a data set
-
CreatePDS
public CreatePDS(java.lang.String dataset, java.lang.String options)Construct a command to create a data set- Parameters:
dataset- the data set to be createdoptions- the options to allocate the data set
-
-
Method Detail
-
create
public void create() throws BuildExceptionCreate a data set- Throws:
BuildException- throwing an exception
-
execute
public int execute() throws BuildExceptionCalls the create()- Specified by:
executein interfaceIExecute- Returns:
- always 0
- Throws:
BuildException- throwing an exception- See Also:
create()
-
getDataset
public java.lang.String getDataset()
Retrieve the data set to be allocated- Returns:
- the data set
-
setDataset
public void setDataset(java.lang.String dataset)
Set the data set to be allocated- Parameters:
dataset- the data set
-
getOptions
public java.lang.String getOptions()
Retrieve the options to be used to allocate the data set- Returns:
- the options
-
setOptions
public void setOptions(java.lang.String options)
Set the options to be used to allocate the data set- Parameters:
options- the options
-
dataset
public CreatePDS dataset(java.lang.String dataset)
Set the data set to be allocated- Parameters:
dataset- the data set- Returns:
- this instance
-
options
public CreatePDS options(java.lang.String options)
Set the options to be used to allocate the data set- Parameters:
options- the options- Returns:
- this instance
-
-