Command line options and arguments

The DBB zBuilder runs from the z/OS UNIX command line and must be launched from the root directory of the application. For example, the tutorial Building the MortgageApplication sample recommends that users copy the sample to /u/user1/MortgageApplication before trying to build it. In that case, you first need to change to that directory before launching zBuilder.

The zBulder basic command has the following format:

#> $DBB_HOME/bin/dbb build <lifecycle> [options]

NOTE: if you add $DBB_HOME/bin to your $PATH then you can run the zBuilder with the following command:

#> dbb build <lifecycle> [options]

Lifecycles are named build definitions that define specific types of builds and are defined in the dbb-build.yaml file. You can use one of the several predefined lifecycles provided by DBB or define your own.

Options vs Arguments

A zBuilder option uses the -- indicator. Options might or might not have a following option value.

# Option to indicate that zBuilder command line help should be printed to the console
#> dbb build full --help

# Option to pass in the HLQ to use during the build
#> dbb build full --hlq USER1.BUILD

IMPORTANT: Running the dbb build --help or dbb build <lifecycle> --help option in DBB 3.0.0 will include the --preview option in its output. Unfortunately, this option is not implemented in DBB 3.0.0 and will result in an actual build being executed. You should avoid using the --preview option with DBB 3.0.0. This option has been implemented as of version 3.0.1.

In addition to options, some zBuilder lifecycles support source file arguments as well.

#> dbb build <lifecycle> [arguments] [options]

A zBuilder argument represents a source file that should be built. It does not use an indicator.

#> dbb build file cobol/epsmpmt.cbl --hlq USER1.BUILD

NOTE: Source file arguments are generally ignored by the zBuilder unless the executing lifecycle includes the DBB provided FileAnalysis task. This task is included in both the user and file predefined lifecycles that are provided with DBB.

zBuilder default valid options

zBuilder validates all options passed in during the build process. If an option is not recognized then a message is generated and the build process terminates.

#>dbb build full --someOption
IBM Dependency Based Build 3.0.0
BUILD
Unrecognized option: --someOption

In the table below, the hasArg column indicates if an option requires an option value.

Option
hasArg Description
--hlq true The dataset high level qualifier for the user executing the build.
--config true File path to an application configuration YAML file. This option is disallowed when a matching include:application element is present.
--dbid true The Db2 Metadata store user id. Ignored by the user lifecycle. See MetadataInit for more information.
--dbpf true The Db2 Metadata store password file. Ignored by the user lifecycle. See MetadataInit for more information.
--dbpw true The Db2 Metadata store encrypted password. Ignored by the user lifecycle. See MetadataInit for more information.
--preview false Preview build using the chosen lifecycle.
--log-encoding true Override of the Start task logEncoding configuration variable and setting of the ouput encoding from the generated log files.
--help false Printing of the command line interface (CLI) help to the console.

Predefined lifecycle options

In addition to the zBuilder default valid options listed above, lifecycles can define additional valid options that the lifecycle supports. The following tables indicate other options that are supported by DBB predefined lifecycles and that can be used when invoking those lifecycles.

Lifecycle: impact

Option
hasArg Description
--baselineRef true Overrides the default ImpactAnalysis Git baseline references determined from the last successful build with user provided Git baselines to measure Git changes from.

Lifecycle: user

The following options are provided by IBM Developer for z/OS and IBM Z Open Editor integrated DBB User Build tools.

Option
hasArg Description
--debug false Adds the TEST compiler option to produce object code that enables debugging with problem determination tools such as IBM® z/OS® Debugger and Fault Analyzer.
--dependencyFile true Generates and uploads a JSON dependency file which can increase user build performance on virtual systems.
--errPrefix true COBOL and PL/I compiler error lists in displayed in DBB user build results views when an error HLQ prefix is provided.