Predefined variables

Variables can be defined in build and application configuration files to control the behavior of build and task execution. In addition to user defined variables, the zBuilder provides a number of predefined variables that are available for use in various parts of build configuration files.

Global variables

These variables are created when the zBuilder starts and can be referenced in any configuration file.

Variable Type Version Description
${APPLICATION} String 3.0.0 The name of the application used when creating MetadataStore Build Groups. Usually the name of the application's Git repository. Default value is ${APP_DIR_NAME}. See Application configuration for configuration options.
${APP_DIR} String 3.0.0 Absolute path to the current application local directory (/u/user/build/MortgageApplication for example).
${APP_DIR_NAME} String 3.0.0 Current application local directory name (MortgageApplication for example). Often used as ${WORKSPACE}/${APP_DIR_NAME}.
${DBB_HOME} String 3.0.0 The location of the DBB installation.
${DBB_CONF} String 3.0.0 The location of the DBB configuration directory.
${DBB_BUILD} String 3.0.0 The location of the zBuilder configuration directory.
${HLQ} String 3.0.0 High-level dataset qualifier. Provided by the zBuilder CLI option --hlq.
Example: >dbb build full --hlq USER1.BUILD
${IS_PREVIEW_MODE} Boolean 3.0.1 Whether the zBuilder is running in preview mode, determined by the --preview option.
${LIFECYCLE} String 3.0.0 The current zBuilder lifecycle that is being executed.
Example: >dbb build full. This will set ${LIFECYCLE} = full.
${LOGS} String 3.0.0 Location to write build log files. Default value is ${APP_DIR}/logs. See Start Task for configuration options.
${STATUS} Integer 3.0.0 The current build status of the build process. Indicates if any programs failed to build due to a language step exceeding the max return code allowed. Can be used in condition: fields. Values are:
0 : Clean build. No warnings or errors.
1 : Error build. At least one program failed to build due to an error.
2 : Warning messages were generated during the build.
${SYSNAME} String 3.0.2 The name of the system on which the build was started.
${SYSPLEX} String 3.0.2 The name of the sysplex in which the build was started.
${USER} String 3.0.2 The name of the user that started the build.
${WORKSPACE} String 3.0.0 The absolute path of the parent directory of ${APP_DIR}. Useful for configuring multi-repository builds. Ex. ${WORKSPACE}/CommonCopybooks/**.cpy.

Language configuration step variables

A language configuration is a special type of task configuration that defines the steps (pre-compile, compile, link, etc.) needed to build a list of source files for a particular language (see Language tasks). At the beginning of each step list iteration, the language configuration processor dynamically creates or updates the step variables for each processed file and add them to the local variables. These variables can be referenced in any step field. The following table lists and explains the step variables.

Step variable Type Version Description
${ENTRY} String 3.0.3 The main entry point of the generated program derived from the source file. Note that ${ENTRY} is only valid for supported source languages otherwise it defaults to ${MEMBER}. Supported languages:
COBOL - Set to the value of PROGRAM-ID.
Link-Edit - Set to the value of the NAME option.
PL/I - Set to the procedure name.
${FILE} String 3.0.0 The source file that is being processed. Usually in the form of a file path relative to the ${WORKSPACE}. Example:
${FILE} = MortgageApplication/cobol/epsnbrvl.cbl
${FILE_DIR} String 3.0.1 The absolute path to the parent directory of ${FILE}. Example:
MortgageApplication/cobol/epsnbrvl.cbl --> /u/workspace/MortgageApplication/cobol
${FILE_EXT} String 3.0.1 The file extension of ${FILE}. Example:
${FILE_EXT} = cbl
${FILE_NAME} String 3.0.1 The entire name of the source file that is being processed including the file extension, derived from ${FILE}. Example:
${FILE_NAME} = epsnbrvl.cbl
${FILE_NAME_BASE} String 3.0.3 The base name of the source file that is being processed, derived from ${FILE}. Example:
${FILE_NAME_BASE} = epsnbrvl
${FILE_PATH} String 3.0.1 The absolute path of the source file. If ${FILE} is not absolute, this path will include the workspace. Example:
${FILE_PATH} = /u/workspace/MortgageApplication/cobol/epsnbrvl.cbl
${IS_CICS} Boolean 3.0.0 A flag that indicates that the program contains CICS calls
${IS_DLI} Boolean 3.0.0 A flag that indicates that the program contains DLI calls
${IS_MQ} Boolean 3.0.0 A flag that indicates that the program contains MQ calls
${IS_SQL} Boolean 3.0.0 A flag that indicates that the program contains SQL calls
${MEMBER} String 3.0.0 The derived data set member name of the file that is processed. Ex.
MortgageApplication/cobol/epsnbrvl.cbl --> EPSNBRVL
${RC} Integer 3.0.0 The return code of the last step executed.
${STEP} String 3.0.0 The name of the current step that is being executed.
${<stepName>} Integer 3.0.0 The return code of a previously executed step name. Ex. condition: ${compile} < 8
If the step was skipped then condition: { exists: ${optionalStep} } will evaluate to false.

Optional step variables

The following step variables are created based on zBuilder command line interface (CLI) options and may not exist. When using these values you should also check that they exist:

 - { name: "SYSXMLSD", condition: { exists: "${errPrefix}" }, dsn: "${HLQ}.${errPrefix}.SYSXMLSD.XML" }
Step variable Type Version CLI Option Description
${debug} Boolean 3.0.0 --debug A flag that indicates that programs should be compiled using IBM Debug for z/OS
${errPrefix} String 3.0.0 --errPrefix Additional dataset qualifier used for IBM Developer for z/OS error feedback function.