Class DDStatement
- java.lang.Object
-
- com.ibm.dbb.build.DDStatement
-
public class DDStatement extends java.lang.Object
Used with MVSExec commands for adding Data Definition (DD) statements.DD statements are allocated before the MVSExec command is executed and then freed after the command is completed unless the pass flag has been set to
true
. MVSExec statements which contain passed DD statements should be part of a MVSJob.
-
-
Constructor Summary
Constructors Constructor Description DDStatement()
Constructs a empty DD StatementDDStatement(DDStatement dd)
Copy constructor for DD StatementDDStatement(DDStatement dd, java.util.List<DDStatement> concatenations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConcatenation(DDStatement dd)
Concatenates a DD statement to this DD statement.void
addConcatenation(java.lang.String dsn, java.lang.String options)
Creates a new DD statement and concatenates it to this DD statement.DDStatement
concatenate(DDStatement statement)
Concatenates a DD statement to this DD statement.DDStatement
ddref(java.lang.String ddref)
Set the DD reference.DDStatement
deployType(java.lang.String deployType)
Set the deploy type for this DDDDStatement
dsn(java.lang.String dsn)
Sets the dataset name for this DD statement.java.util.List<DDStatement>
getConcatenations()
Retrieves the list of DD statements that are concatenated to this DD statementjava.lang.String
getDDref()
Get the DD reference for this DD statement.java.lang.String
getDeployType()
get the deploy type for this DDjava.lang.String
getDsn()
Retrieves the dataset name for this DD statement.java.lang.String
getInstreamData()
Retrieve the instream data of this DD.java.lang.String
getName()
Retrieves the DD name of this DD statement.java.lang.String
getOptions()
Retrieves the BPXWDYN allocation options for this DD statement.java.lang.String
getPath()
Retrieves the path for this DD statement.java.lang.String
getVersion()
DDStatement
instreamData(java.lang.String instreamData)
Set the instream data for this DDboolean
isOutput()
Check if this DD is an output DD.boolean
isPass()
Tests thepass
flag for this DD statement.boolean
isReport()
Check if this DD should be reported in the build reportDDStatement
name(java.lang.String name)
Sets the DD name for this DD statement.DDStatement
options(java.lang.String options)
Sets the BPXWDYN allocation options for this DD statement.DDStatement
output(boolean output)
Set whether this DD as an output DDDDStatement
pass(boolean pass)
Sets thepass
flag for this DD statement.DDStatement
path(java.lang.String path)
Sets the path for this DD statement.DDStatement
report(boolean report)
Set whether this DD should be reported in the build report.void
setDDref(java.lang.String ddref)
Set the DD reference.void
setDeployType(java.lang.String deployType)
Set the deploy type for this DDvoid
setDsn(java.lang.String dsn)
Sets the dataset name for this DD statement.void
setInstreamData(java.lang.String instreamData)
Set the instream data for this DDvoid
setName(java.lang.String name)
Sets the DD name for this DD statement.void
setOptions(java.lang.String options)
Sets the BPXWDYN allocation options for this DD statement.void
setOutput(boolean output)
Set whether this DD as an output DDvoid
setPass(boolean pass)
Sets thepass
flag for this DD statement.void
setPath(java.lang.String path)
Sets the path for this DD statement.void
setReport(boolean report)
Set whether this DD should be reported in the build report.void
setVersion(java.lang.String version)
-
-
-
Constructor Detail
-
DDStatement
public DDStatement()
Constructs a empty DD Statement
-
DDStatement
public DDStatement(DDStatement dd)
Copy constructor for DD Statement- Parameters:
dd
- An existing DD statement. The DD statement is not required to have a DD name.
-
DDStatement
public DDStatement(DDStatement dd, java.util.List<DDStatement> concatenations)
-
-
Method Detail
-
getConcatenations
public java.util.List<DDStatement> getConcatenations()
Retrieves the list of DD statements that are concatenated to this DD statement- Returns:
- List of DD statements that are concatenated to this DD statement. Never null.
-
addConcatenation
public void addConcatenation(DDStatement dd)
Concatenates a DD statement to this DD statement.- Parameters:
dd
- An existing DD statement. The DD statement is not required to have a DD name.
-
addConcatenation
public void addConcatenation(java.lang.String dsn, java.lang.String options)
Creates a new DD statement and concatenates it to this DD statement.- Parameters:
dsn
- Dataset name to allocate. Required for concatenations.options
- BPXWDYN allocation options. See BPXWDYN: Dynamic Allocation
-
getName
public java.lang.String getName()
Retrieves the DD name of this DD statement.- Returns:
- The name of this DD statement. Can be NULL if this DD statement is part of a concatenation.
-
setName
public void setName(java.lang.String name)
Sets the DD name for this DD statement.- Parameters:
name
- The name of this DD statement.
-
getDsn
public java.lang.String getDsn()
Retrieves the dataset name for this DD statement.- Returns:
- The dataset name for this DD statement. Can be NULL if this DD statement allocates a temporary dataset.
-
setDsn
public void setDsn(java.lang.String dsn)
Sets the dataset name for this DD statement.- Parameters:
dsn
- The dataset name for this DD statement.
-
setPath
public void setPath(java.lang.String path)
Sets the path for this DD statement.- Parameters:
path
- The path for this DD statement.
-
getPath
public java.lang.String getPath()
Retrieves the path for this DD statement.- Returns:
- The path for this DD statement.
-
getOptions
public java.lang.String getOptions()
Retrieves the BPXWDYN allocation options for this DD statement.- Returns:
- The BPXWDYN allocation options for this DD statement.
- See Also:
- BPXWDYN: Dynamic Allocation
-
setOptions
public void setOptions(java.lang.String options)
Sets the BPXWDYN allocation options for this DD statement.- Parameters:
options
- The BPXWDYN allocation options for this DD statement.- See Also:
- BPXWDYN: Dynamic Allocation
-
isPass
public boolean isPass()
Tests thepass
flag for this DD statement.Normally DD statements are freed after an MVSExec command is completed. However if the pass flag is set to
true
, then the DD statement is not freed and can be used by subsequent MVSExec statements. MVSExec statements which contain passed DD statements should be part of a MVSJob.- Returns:
- The boolean value of the pass flag.
-
setPass
public void setPass(boolean pass)
Sets thepass
flag for this DD statement.Normally DD statements are freed after an MVSExec command is completed. However if the pass flag is set to
true
, then the DD statement is not freed and can be used by subsequent MVSExec statements. MVSExec statements which contain passed DD statements should be part of a MVSJob.- Parameters:
pass
- The value to set the pass flag.
-
isOutput
public boolean isOutput()
Check if this DD is an output DD.- Returns:
true
if this DD is an output DD;false
otherwise.
-
setOutput
public void setOutput(boolean output)
Set whether this DD as an output DD- Parameters:
output
-true
if this is an output DD;false
otherwise.
-
isReport
public boolean isReport()
Check if this DD should be reported in the build report- Returns:
true
if this DD should be reported in the build report;false
otherwise.
-
getInstreamData
public java.lang.String getInstreamData()
Retrieve the instream data of this DD.- Returns:
- the instream data of this DD.
-
setInstreamData
public void setInstreamData(java.lang.String instreamData)
Set the instream data for this DD- Parameters:
instreamData
- the instream data
-
getDeployType
public java.lang.String getDeployType()
get the deploy type for this DD- Returns:
- deployType
-
setDeployType
public void setDeployType(java.lang.String deployType)
Set the deploy type for this DD- Parameters:
deployType
- the value of the deploy type
-
setReport
public void setReport(boolean report)
Set whether this DD should be reported in the build report.- Parameters:
report
-true
if this DD should be reported in the build report;false
otherwise.
-
name
public DDStatement name(java.lang.String name)
Sets the DD name for this DD statement.- Parameters:
name
- The name of this DD statement.- Returns:
- this instance
-
dsn
public DDStatement dsn(java.lang.String dsn)
Sets the dataset name for this DD statement.- Parameters:
dsn
- The dataset name for this DD statement.- Returns:
- this instance
-
path
public DDStatement path(java.lang.String path)
Sets the path for this DD statement.- Parameters:
path
- The path for this DD statement.- Returns:
- this instance
-
options
public DDStatement options(java.lang.String options)
Sets the BPXWDYN allocation options for this DD statement.- Parameters:
options
- The BPXWDYN allocation options for this DD statement.- Returns:
- this instance
- See Also:
- BPXWDYN: Dynamic Allocation
-
pass
public DDStatement pass(boolean pass)
Sets thepass
flag for this DD statement.Normally DD statements are freed after an MVSExec command is completed. However if the pass flag is set to
true
, then the DD statement is not freed and can be used by subsequent MVSExec statements. MVSExec statements which contain passed DD statements should be part of a MVSJob.- Parameters:
pass
- The value to set the pass flag.- Returns:
- this instance
-
output
public DDStatement output(boolean output)
Set whether this DD as an output DD- Parameters:
output
-true
if this is an output DD;false
otherwise.- Returns:
- this instance
-
report
public DDStatement report(boolean report)
Set whether this DD should be reported in the build report.- Parameters:
report
-true
if this DD should be reported in the build report;false
otherwise.- Returns:
- this instance
-
instreamData
public DDStatement instreamData(java.lang.String instreamData)
Set the instream data for this DD- Parameters:
instreamData
- the instream data- Returns:
- this instance
-
concatenate
public DDStatement concatenate(DDStatement statement)
Concatenates a DD statement to this DD statement.- Parameters:
statement
- An existing DD statement. The DD statement is not required to have a DD name.- Returns:
- this instance
-
deployType
public DDStatement deployType(java.lang.String deployType)
Set the deploy type for this DD- Parameters:
deployType
- the value of the deploy type- Returns:
- this instance
-
getDDref
public java.lang.String getDDref()
Get the DD reference for this DD statement. A DD reference refers to the DD name of another allocated DD statement. This is typically used to concatenate DDs To a DD statement, especially in the case of using instream data. For example:new DDStatement().name("SYSIN").instreamData(linkEditInstream).options(props.instreamDataTempAllocation) new DDStatement().name("SYSLIN").dsn("${props.cobol_objPDS}($member)").options('shr') new DDStatement().ddref("SYSIN")
- Returns:
- DD reference
-
setDDref
public void setDDref(java.lang.String ddref)
Set the DD reference. A DD reference refers to the DD name of another allocated DD statement. This is typically used to concatenate DDs To a DD statement, especially in the case of using instream data. For example:new DDStatement().name("SYSIN").instreamData(linkEditInstream).options(props.instreamDataTempAllocation) new DDStatement().name("SYSLIN").dsn("${props.cobol_objPDS}($member)").options('shr') new DDStatement().ddref("SYSIN")
- Parameters:
ddref
- DD name reference
-
ddref
public DDStatement ddref(java.lang.String ddref)
Set the DD reference. A DD reference refers to the DD name of another allocated DD. This is typically used to concatenate DDs To a DD statement, especially in the case of using instream data. For example:new DDStatement().name("SYSIN").instreamData(linkEditInstream).options(props.instreamDataTempAllocation) new DDStatement().name("SYSLIN").dsn("${props.cobol_objPDS}($member)").options('shr') new DDStatement().ddref("SYSIN")
- Parameters:
ddref
- DD name reference- Returns:
- this instance
-
getVersion
public java.lang.String getVersion()
-
setVersion
public void setVersion(java.lang.String version)
-
-