Language task
Language tasks are special tasks used to build a list of source files for a specific language like Cobol, PL/I, Assembler. DBB provides a built-in generic language processor task. You only need provide the YAML configuration files for each file type that you want to build.
- language: Cobol
# list of source file patterns associated to this language task
sources:
- "**.cbl"
- "**.cob"
# externalized variables to be overridden by applications
variables:
# default compiler. Can be overridden by application.
- name: compiler
value: IGY.V6R1M0.SIGYCOMP
# datasets that need to be created / validated for this language task
datasets:
- name: ${HLQ}.COBOL
options: tracks space(1,1) lrecl(80) dsorg(PO) recfm(F,B) dsntype(library)
- name: ${HLQ}.OBJ
options: tracks space(1,1) lrecl(80) dsorg(PO) recfm(F,B) dsntype(library)
# list of steps to execute for each program processed by this language task
steps:
- step: CopySource
type: copy
source: ${WORKSPACE}/${APPLICATION}/${FILE}
target: //${HLQ}.COBOL(${MEMBER})
- step: Compile
type: mvs
pgm: ${compiler}
parm: LIB
dds:
- { name: "SYSIN", dsn: "${HLQ}.COBOL(${MEMBER})", options: "shr", input: true }
- { name: "SYSLIN", dsn: "${HLQ}.OBJ(${MEMBER})", options: "shr", output: true }
- { name: "SYSUT1", options: "cyl space(5,5) unit(vio) new" }
. . .
Language task structure
The language task configuration has four main sections:
Section
|
YAML Reference | Description |
---|---|---|
Sources | sources: |
Used to associate source files to this language task. A language specific sublist is created from the overall build list produced by the zBuilder analysis tasks using the provide UNIX file glob patterns. |
Variables | variables: |
Variables allow applications to override default build configuration. See the Variables key concept page for more information. |
Datasets | datasets |
List of datasets that are required by the language task to build source files. The zBuilder will check to see that the datasets exist or if not, will create them using the provided creation options. NOTE: DBB uses BPXWDYN allocation options for dataset creation. For details see BPXWDYN: Dynamic Allocation. |
Build steps | steps: |
List of steps that is to be executed to each source file in the language sub-list. |
Build step loop
The core function of the language task is to provide the list of steps to be executed for each source file that is processed by the language configuration processor. The following step types are supported:
Step type | YAML Reference | Description |
---|---|---|
MVS | type: mvs |
Executes a z/OS program. |
TSO | type: mvs |
Executes a TSO command. |
ISPF | type: ispf |
Executes an ISPF command. |
Job | type: job |
Submits a JCL job and waits for results. |
Unix | type: unix |
Executes a UNIX command or program. |
Copy | type: copy |
Copies z/OS UNIX files to data sets and data set members to z/OS Unix directories. |
Task | type: task |
Runs a zBuilder basic task that is implemented in Java or Groovy. |
Step variables
At the beginning of each step list iteration, the language processor creates step variables for each source file tha is being processed. These variables can be referenced in any step field. The following table lists and explains the step variables.
Step variable | Type | Description |
---|---|---|
${FILE} |
String | The source file that is processed. Usually in the form of a file path relative to the ${WORKSPACE} |
${IS_CICS} |
Boolean | A flag that indicates that the program contains CICS calls |
${IS_DLI} |
Boolean | A flag that indicates that the program contains DLI calls |
${IS_MQ} |
Boolean | A flag that indicates that the program contains MQ calls |
${IS_SQL} |
Boolean | A flag that indicates that the program contains SQL calls |
${MEMBER} |
String | The derived data set member name of the file that is processed. Ex. MortgageApplication/cobol/epsnbrvl.cbl --> EPSNBRVL |
${RC} |
Integer | The return code of the last step executed. |
${STEP} |
String | The name of the current step that is being executed. |
${<stepName>} |
Integer | The return code of a previously executed step name. Ex. condition: ${compile} < 8 |
Additional topics
For more information about language tasks see: