Configuring language compiler scripts

If you are a build engineer, you most likely want to modify the language compiler configurations. These are used as the default configurations that application configurations will override.

If you are the owner of an application, you most likely want to modify the application configuration. Review the Application configuration reference instead.

Prerequisites

Estimated time

This tutorial takes about 15 minutes to complete.

Steps

  1. In your zBuilder configuration directory (default /usr/lpp/IBM/dbb/build), open samples > languages.
  2. Copy the Cobol.yaml configuration and give it a new name, then open the new configuration for modification. Modifying the original sample directly is not recommended.
  3. The sources field contains a list of file matching patterns that determine if a source file should use this language compiler during the Language build step. Out-of-box, all .cbl files inside of the cobol directory located in your Application directory will use this Cobol compiler. Review and configure this if necessary.
# source file association patterns
  sources:
    - "**/cobol/*.cbl"
  1. Review and configure the configuration variables.

Configuration variables

The variables field contains a list of configuration variables that are used in other sections of this language compiler script. See the variables reference for more information.

It is best practice to only create variables that you expect application owners to override with their application configurations. This is why, out-of-box, things like dataset names are not configuration variables. The restrict keyword can be used to lock down variables from being overridden, but that should be used for edge cases, not as a standard practice. See Variables for more details.

Review the following configuration variables to verify they work with your configuration:

  1. compileParms defines the MVS parameters to compile applications with. This variable uses the append field, which concatenates values based on if the conditionals evaluate to true or not. See Variables for more details. For example, if a dependency scan on the file being compiled indicates that it uses CICS, it will add the CICS value to the compile parameters. If you want to set a default value for this field, add a value before the append field.
- name: compileParms
  value: DEFAULT_PARM
  append:
    - condition: ${IS_CICS}
      value: CICS
      ...
  1. linkEditParms defines link-edit parameters. These parameters do not change depending on a conditional out-of-box. Review your requirements and determine if you need to change these.
  2. dependencySearchPath field defines the dependency search path, which will be used to generate a set of possible file paths to be used as physical dependencies. Out-of-box, it targets all files ending in .cpy in your Application directory's copybook directory as a set of possible dependency files to use while resolving logical dependencies.

Add the modified configuration to Languages

As you created a new configuration file, if its name is different than the original sample, you will need to add this script to the Languages configuration so zBuilder knows to use it. You can learn how to do that by following the steps in Configuring zBuilder Languages.

Summary

If you have followed this tutorial, you have now successfully configured your Cobol.yaml language compiler script. Review all of the other languages in your configuration and verify that any parameters or paths they contain are compatible with your setup.

If you want to modify these language compiler scripts further, you may reference the Language Samples Reference and the zBuilder YAML schema reference.