dds:
The dds:
step element defines DD statements to be included in the step. The MVSExec, TSOExec, and ISPFExec step types all use the dds:
YAML field because they all include DD Statements.
Syntax
Most DD statements contain a few fields only. However, many options are available:
dds:
- name: string # the DD name.
dsn: string # The dataset to be allocated.
options: string # BPXWDYN allocation options.
condition: boolean # Boolean condition to optionally allocate DD Statement.
instream: string # MVSExec DD instream data.
pass: boolean # Flag indicating to pass a temporary DD to later MVS steps.
input: boolean # Flag to add DD to build report as an input.
output: boolean # Flag to add DD to build repost as an output.
deployType: string # Build report deploy type for output DD statements.
path: string # z/OS UNIX file path of DD statement. Mutually exclusive with dsn and ref.
ref: string # DD name reference of DD statement. Mutually exclusive with dsn and path.
log: string # Copies the DD statement content to the output directory on z/OS UNIX file.
logAppend: boolean # flag indicating if existing log file should be overwritten or appended.
logEncoding: string # The codepage for the copied log file.
logMode: CopyMode # The CopyMode for the copied log file.
scan: boolean # Flag indicating that an output load module should be scanned.
Syntax description
name
The DD name. Can be excluded to concatenate to the previously named DD statement.
dsn
The dataset to be allocated. Can be excluded to create a temporary DD.
options
The BPXWDYN allocation options for this DD statement.
condition
A boolean value, boolean expression, or an advanced condition to optionally allocate this DD statement. In the absence of a condition, DD will always be allocated.
For more information on the conditions, see Conditions.
instream
A list of single elements representing MVSExec DD instream data.
If you want to concatenate instream data to another DD statement, you must first create its own DD statement with its own DD name and then reference that statement with ref
in the concatenation. For example:
dds:
- { name: "SYSREF", instream: " INCLUDE INSTREAM.", options: "tracks space(5,5) unit(vio) blksize(80) lrecl(80) recfm(f,b) new" }
- { name: "SYSIN", dsn: "${HLQ}.COBOL(PRGRM)", options: "shr" }
- { ref: "SYSREF" }
pass
A boolean flag indicating whether a temporary DD should be passed to later MVS steps.
input
A boolean flag indicating whether this DD statement is an input and should be added to the build report as such.
output
A boolean flag indicating whether this DD statement is an output and should be added to the build report as such.
deployType
For output DD statements, represents the deploy type for the build report.
path
z/OS UNIX file path of DD statement. Mutually exclusive with dsn and ref.
ref
DD name reference of DD statement. Mutually exclusive with dsn and path.
log
If provided, the DD statement content will be copied to the log file specified by this field.
logAppend
A boolean flag indicating whether the existing log file should be overwritten or appended.
logEncoding
The desired codepage for the copied log file.
logMode
The DBB CopyMode
that should be used when copying the log file. For more information, refer to the CopyToHFS
documentation.
scan
A boolean flag indicating whether an output load module should be scanned by the DBB link-edit scanner for runtime / static link dependency metadata discovery.
Example
dds:
- { name: 'SYSIN', dsn: '${HLQ}.COBOL(${MEMBER})', input: 'true'}
- { condition: '${isCICS}', dsn: 'DFH.V3R2M0.CICS.SDFHLOAD'}
- { name: 'SYSPRINT', log: '${MEMBER}_${STEP}.log', options: 'lrecl(80) recfm(f,b) new'}
- name: ‘SYSIN’
instream:
- RECORD 1
- RECORD 2
- RECORD 3
Note: This example mostly uses an inline format for defining the YAML map representing the DD statement. Formatting the YAML like this more closely resembles a JCL file. The instream data uses a more traditional YAML format. Both formats are completely acceptable.
DD variables
Since 3.0.2: DD statements can be defined and imported as variables to add DD statements from other sources. For example, define a dd variable in Application.yaml
in the following way:
application:
tasks:
- task: Cobol
variables:
# List of additional libraries for compile SYSLIB
- name: additionalCompileLibraries
value:
- { dsn: "COMMON.BUILD.UTILS1", options: "shr"}
- { dsn: "COMMON.BUILD.UTILS2", options: "shr"}
forFiles:
- "**/cobol/epsnbrvl.cbl"
- "**/cobol/epsmlist.cbl"
Then enter the following lines in Cobol.yaml
:
language: Cobol
variables:
# list of additional SYSLIB DDs. Default is an empty list.
- name: additionalCompileLibraries
value: []
# . . .
dds:
- { name: "SYSLIB", dsn: "${HLQ}.COPY", options: "shr" }
- { dsn: "${HLQ}.BMS.COPY", options: "shr" }
- { dsn: "${SDFHCOB}", condition: "${IS_CICS}", options: "shr" }
- { dsn: "${SCSQCOBC}", condition: "${IS_MQ}", options: "shr" }
- ${additionalCompileLibraries}
You can define DD statement variables in various ways, including:
# Define a single DD
- name: sysinDDS
value: { name: "SYSIN", dsn: "${HLQ}.COBOL(${MEMBER})", options: "shr", input: true }
# Define a single DD in a list
- name: syslinDDS
value:
- { name: "SYSLIN", dsn: "${HLQ}.OBJ(${MEMBER})", options: "shr", output: true }
# Define a list of DD statements
- name: SYSUT1-5
value:
- { name: "SYSUT1", options: "cyl space(5,5) unit(vio) blksize(80) lrecl(80) recfm(f,b) new" }
- { name: "SYSUT2", options: "cyl space(5,5) unit(vio) blksize(80) lrecl(80) recfm(f,b) new" }
- { name: "SYSUT3", options: "cyl space(5,5) unit(vio) blksize(80) lrecl(80) recfm(f,b) new" }
- { name: "SYSUT4", options: "cyl space(5,5) unit(vio) blksize(80) lrecl(80) recfm(f,b) new" }
- { name: "SYSUT5", options: "cyl space(5,5) unit(vio) blksize(80) lrecl(80) recfm(f,b) new" }