GitHubContribute in GitHub: Edit online

Migrating a Groovy build script

In this tutorial, you will use the Groovy migration script, introduced in DBB 3.0.4, to migrate the zAppBuild build process and configuration used to build the MortgageApplication sample.

Prerequisites

Estimated time

This tutorial takes about 30 minutes to complete.

Steps

1. Set up the zAppBuild MortgageApplication sample

  1. Create a folder and clone the zAppBuild repository to the directory:

    ~/migration/zAppBuild #>git clone https://github.com/IBM/dbb-zappbuild.git .
    
  2. Create a datasets.properties file and configure system library locations.

    The following definitions are required to build the MortgageApplication:

    # High Level Assembler (HLASM) load library. Example: ASM.SASMMOD1
    SASMMOD1=ASM.SASMMOD1
    
    # CICS Load Library. Example: CICSTS.V3R2M0.CICS.SDFHLOAD
    SDFHLOAD=DFH.V4R1M0.CICS.SDFHLOAD
    
    # CICS Macro Library. Example: CICSTS.V3R2M0.CICS.SDFHMAC
    SDFHMAC=DFH.V4R1M0.CICS.SDFHMAC
    
    # z/OS macro library. Example: SYS1.MACLIB
    MACLIB=SYS1.MACLIB
    
    # LE (Language Environment) load library. Example: CEE.SCEELKED
    SCEELKED=CEE.SCEELKED
    
    # CICS COBOL Library. Example: CICSTS.V3R2M0.CICS.SDFHCOB
    SDFHCOB=DFH.V4R1M0.CICS.SDFHCOB
    
    # DB2 Load Library. Example: DB2.V9R1M0.SDSNLOAD
    SDSNLOAD=DSN.V11R1M0.SDSNLOAD
    
    # Cobol Compiler Data Sets. Example: COBOL.V4R1M0.SIGYCOMP
    SIGYCOMP_V6=IGY.V6R1M0.SIGYCOMP
    
  3. To ensure the configuration is correct, run a build that uses zAppBuild by entering the following command:

    ~/migration/output #>$DBB_HOME/bin/groovyz ../zAppBuild/build.groovy -w ../zAppBuild/samples -a MortgageApplication -o . -hlq KMCGREG.ZAPP --propFiles $PWD/../datasets.properties --fullBuild
    

    At the end, you should have a clean build:

    ** Build State : CLEAN
    ** Total files processed : 9
    ** Total build time  : 10.354 seconds
    
    ** Build finished
    

2. Run the migration

Now that you know zAppBuild can successfully build the MortgageApplication, you can start the migration process.

  1. Prepare to run the migration script.

    The migrateGroovy.sh migration script can be found in $DBB_HOME/migration/bin. To call the script, pass the zAppBuild arguments into the migrateGroovy.sh shell script, instead of groovyz.

    To avoid building the MortgageApplication during the migration process, add the --preview argument to the command.

  2. Run the migration script.

    Run the prepared migration command:

    ~/migration/output #>$DBB_HOME/migration/bin/migrateGroovy.sh ../zAppBuild/build.groovy -w ../zAppBuild/samples -a MortgageApplication -o . -hlq KMCGREG.ZAPP --propFiles $PWD/../datasets.properties --fullBuild --preview
    

    After the output from zAppBuild, you should see the language scripts that were migrated:

    Beginning Migration:
    Processing BMS.groovy
    Created yaml file: 'BMS.yaml'
    
    Processing Cobol.groovy
    Created yaml file: 'Cobol.yaml'
    
    Processing LinkEdit.groovy
    Created yaml file: 'LinkEdit.yaml'
    
  3. Understand what was migrated:

    From the above output, you can see that a language YAML file was created for each language build script that was run by zAppBuild.

    From top to bottom, each file has the following content:

    • A comment that explains the next steps to take in order to finish the migration process
    • The language name
    • Patterns to match source files to this language, which you must fill in
    • Basic and file variables used within that language script
    • Datasets and their corresponding creation options used by the task
    • The steps that the build script performed
  4. Paramaterize the YAML configuration file.

    To make the YAML file usable within the zBuilder framework, you need to parameterize it accordingly. As the migration script does not migrate all the variables or the variables that are composed of other variables, you need to insert zBuilder-provided variables in their place.

    Set up these languages in a similar manner to their samples found in $DBB_HOME/samples/languages.

    1. Configure the source patterns for each language by entering the following values:

      • BMS.yaml: "**.bms"
      • Cobol.yaml: "**.cbl"
      • LinkEdit.yaml: "**.lnk"
      version: 1.0.3
      tasks:
      - language: BMS
          sources:
          - '**.bms'
      
    2. Replace every reference of KMCGREG.ZAPP, the HLQ used when migrating, with the ${HLQ} zBuilder-provided value. You can set this value by using the --hlq <hlq> command line option. Otherwise, it defaults to your user name.

      version: 1.0.3
      tasks:
      - language: BMS
          ...
          variables:
          - name: bms_srcPDS
              value: ${HLQ}.BMS
      
    3. In the Cobol.yaml file, insert the ${WORKSPACE} variable into the cobol_dependencySearch variable:

      The value of this zBuilder-provided variable comes from the working directory in which the zBuilder was launched.

      version: 1.0.3
      tasks:
      - language: Cobol
          ...
          variables:
          - name: cobol_dependencySearch
            value: search:${WORKSPACE}?path=MortgageApplication/copybook/*.cpysearch:${WORKSPACE}?path=imports/**/include/bin/*.OBJ
      
  5. Fill in conditional logic.

    When the migration process encounters a condition, the code used in the condition is extracted and placed into the YAML file to serve as a simple reference for why each step or DD statement is used. However, you must modify these conditions to conform to zBuilder standards.

    The following examples are the most common conditions:

    • TODO: else block: In most cases you can remove this field as it is the default action to take.
    • TODO: buildUtils.isCICS(logicalFile): You can replace this field with the ${IS_CICS} variable provided by zBuilder.
    • TODO: buildUtils.isSQL(logicalFile): You can replace this field with the ${IS_SQL} variable provided by zBuilder.

    LinkEdit.yaml modifications:

    Replace the condition on this line, near the end of the file, with ${IS_CICS}:

    - {dsn: '${SDFHLOAD}', condition: 'TODO: buildUtils.isCICS(logicalFile)', options: shr}
    
    ->
    
    - {dsn: '${SDFHLOAD}', condition: '${IS_CICS}', options: shr}
    

    And then remove the existence condition check on the following line:

    - {dsn: '${SDSNLOAD}', condition: 'TODO: props.SDSNLOAD', options: shr}
    
    ->
    
    - {dsn: '${SDSNLOAD}', options: shr}
    

    Cobol.yaml modifications:

    Remove any condition fields that contain the text TODO: else block. These are the default actions in zAppBuild, which you always want to use in this case.

    - {name: SYSIN, dsn: '${cobol_srcPDS}(${MEMBER})', condition: 'TODO: else block', options: shr, input: true}
    
    -> 
    
    - {name: SYSIN, dsn: '${cobol_srcPDS}(${MEMBER})', options: shr, input: true}
    

    Then, remove the condition fields that contain the text TODO: sysin_linkEditInstream as they are existence checks that are satisfied by the static definitions.

    - {condition: 'TODO: sysin_linkEditInstream', ref: SYSIN}
    
    ->
    
    - {ref: SYSIN}
    

    The condition TODO: (props.bms_cpyPDS && com.ibm.jzos.ZFile.dsExists(''${props.bms_cpyPDS}'')) is another existence check that you must handle the same way.

    - {dsn: '${bms_cpyPDS}', condition: 'TODO: (props.bms_cpyPDS && com.ibm.jzos.ZFile.dsExists(''${props.bms_cpyPDS}''))', options: shr}
    
    ->
    
    - {dsn: '${bms_cpyPDS}', options: shr}
    

    Next, replace the condition text for any condition fields with the text TODO: buildUtils.isCICS(logicalFile) or TODO: buildUtils.isSQL(logicalFile). The replaced conditions should be ${IS_CICS} and ${IS_SQL} respectively.

    - {dsn: '${SDFHLOAD}', condition: 'TODO: buildUtils.isCICS(logicalFile)', options: shr}
    - {dsn: '${SDSNLOAD}', condition: 'TODO: buildUtils.isSQL(logicalFile)', options: shr}
    
    ->
    
    - {dsn: '${SDFHLOAD}', condition: '${IS_CICS}', options: shr}
    - {dsn: '${SDSNLOAD}', condition: '${IS_SQL}', options: shr}
    

    Lastly, replace the condition attached to the last step with your own variable. Replace the condition: TODO: needsLinking.toBoolean() with a variable you will define next: ${doLinkEdit}

    - step: mvsCall
      type: mvs
      condition: 'TODO: needsLinking.toBoolean()' -> '${doLinkEdit}'
      pgm: IEWBLINK
      parm: ${cobol_linkEditParms},SSI=c1f6730e
    

    And then, set the default value of doLinkEdit to true in the Cobol.yaml file. This will be overridden by a file variable inside of the application configuration, dbb-app.yaml.

    version: 1.0.3
    tasks:
    - language: Cobol
        ...
        variables:
          ...
          - name: cobol_loadOptions
            value: cyl space(1,1) dsorg(PO) recfm(U) blksize(32760) dsntype(library)
          - name: doLinkEdit
            value: true
    

3. Validate the migration

The following YAML files are expected:

  • BMS.yaml

    #Yaml generated by $DBB_HOME/migration/bin/migrateGroovy.sh
    #    Script source: '/u/kmcgreg/testing/zBuildMigrationDemo/zApp/languages/BMS.groovy'
    #
    #The following fields are marked with 'TODO' and must be filled in manually:
    #    Condition: contains the original condition text which must be modified to fit zBuilder standards
    #    Sources: file patterns matching the USS filenames/locations a language script should build
    #
    #Additionally, migrated variables do not reference other variables. zBuilder provided variables, such as '${HLQ}' and '${WORKSPACE}' must be inserted manually.
    version: 1.0.3
    tasks:
      - language: BMS
        sources:
          - '**.bms'
        variables:
          - name: bms_srcPDS
            value: ${HLQ}.BMS
          - name: bms_cpyPDS
            value: ${HLQ}.BMS.COPY
          - name: SDFHMAC
            value: DFH.V4R1M0.CICS.SDFHMAC
          - name: MACLIB
            value: SYS1.MACLIB
          - name: SASMMOD1
            value: ASM.SASMMOD1
          - name: bms_copyGenParms
            value: SYSPARM(DSECT),DECK,NOOBJECT
          - name: bms_compileParms
            value: SYSPARM(MAP),DECK,NOOBJECT
          - name: bms_loadPDS
            value: ${HLQ}.LOAD
          - name: SCEELKED
            value: CEE.SCEELKED
          - name: SDFHLOAD
            value: DFH.V4R1M0.CICS.SDFHLOAD
          - name: bms_linkEditParms
            value: MAP,RENT,COMPAT(PM5)
          - name: bms_srcOptions
            value: cyl space(1,1) lrecl(80) dsorg(PO) recfm(F,B) dsntype(library)
          - name: bms_loadOptions
            value: cyl space(1,1) dsorg(PO) recfm(U) blksize(32760) dsntype(library)
        datasets:
          - name: ${bms_srcPDS}
            options: ${bms_srcOptions}
          - name: ${bms_cpyPDS}
            options: ${bms_srcOptions}
          - name: ${bms_loadPDS}
            options: ${bms_loadOptions}
        steps:
          - step: copySrc
            type: copy
            target: //'${bms_srcPDS}(${MEMBER})'
          - step: mvsCall
            type: mvs
            pgm: ASMA90
            parm: ${bms_copyGenParms}
            dds:
              - {name: SYSIN, dsn: '${bms_srcPDS}(${MEMBER})', options: shr, input: true}
              - {name: SYSPRINT, options: 'cyl space(5,5) unit(vio) lrecl(80) recfm(f,b) new', log: '${STEP}-${FILE_NAME}.log', logEncoding: '${LOG_ENCODING}'}
              - {name: SYSPUNCH, dsn: '${bms_cpyPDS}(${MEMBER})', options: shr, output: true, deployType: MAPCOPY}
              - {name: SYSUT1, options: 'cyl space(5,5) unit(vio) lrecl(80) recfm(f,b) new'}
              - {name: SYSUT2, options: 'cyl space(5,5) unit(vio) lrecl(80) recfm(f,b) new'}
              - {name: SYSUT3, options: 'cyl space(5,5) unit(vio) lrecl(80) recfm(f,b) new'}
              - {name: SYSLIB, dsn: '${SDFHMAC}', options: shr}
              - {dsn: '${MACLIB}', options: shr}
              - {name: TASKLIB, dsn: '${SASMMOD1}', options: shr}
          - step: mvsCall
            type: mvs
            pgm: ASMA90
            parm: ${bms_compileParms}
            dds:
              - {name: SYSIN, dsn: '${bms_srcPDS}(${MEMBER})', options: shr}
              - {name: SYSPRINT, options: 'cyl space(5,5) unit(vio) lrecl(80) recfm(f,b) new', log: '${STEP}-${FILE_NAME}.log', logEncoding: '${LOG_ENCODING}'}
              - {name: SYSPUNCH, dsn: '&&TEMPOBJ', options: 'cyl space(5,5) unit(vio) lrecl(80) recfm(f,b) new', pass: true}
              - {name: SYSUT1, options: 'cyl space(5,5) unit(vio) lrecl(80) recfm(f,b) new'}
              - {name: SYSUT2, options: 'cyl space(5,5) unit(vio) lrecl(80) recfm(f,b) new'}
              - {name: SYSUT3, options: 'cyl space(5,5) unit(vio) lrecl(80) recfm(f,b) new'}
              - {name: SYSLIB, dsn: '${SDFHMAC}', options: shr}
              - {dsn: '${MACLIB}', options: shr}
              - {name: TASKLIB, dsn: '${SASMMOD1}', options: shr}
          - step: mvsCall
            type: mvs
            pgm: IEWBLINK
            parm: ${bms_linkEditParms},SSI=c1f6730e
            dds:
              - {name: SYSLIN, dsn: '&&TEMPOBJ', options: shr}
              - {name: SYSLMOD, dsn: '${bms_loadPDS}(${MEMBER})', options: shr, output: true, deployType: MAPLOAD}
              - {name: SYSPRINT, options: 'cyl space(5,5) unit(vio) lrecl(80) recfm(f,b) new', log: '${STEP}-${FILE_NAME}.log', logEncoding: '${LOG_ENCODING}'}
              - {name: SYSUT1, options: 'cyl space(5,5) unit(vio) lrecl(80) recfm(f,b) new'}
              - {name: SYSLIB, dsn: '${SCEELKED}', options: shr}
              - {dsn: '${SDFHLOAD}', options: shr}
    
  • Cobol.yaml

    #Yaml generated by $DBB_HOME/migration/bin/migrateGroovy.sh
    #    Script source: '/u/kmcgreg/testing/zBuildMigrationDemo/zApp/languages/Cobol.groovy'
    #
    #The following fields are marked with 'TODO' and must be filled in manually:
    #    Condition: contains the original condition text which must be modified to fit zBuilder standards
    #    Sources: file patterns matching the USS filenames/locations a language script should build
    #
    #Additionally, migrated variables do not reference other variables. zBuilder provided variables, such as '${HLQ}' and '${WORKSPACE}' must be inserted manually.
    version: 1.0.3
    tasks:
      - language: Cobol
        sources:
          - '**.cbl'
        variables:
          - name: cobol_srcPDS
            value: ${HLQ}.COBOL
          - name: cobol_objPDS
            value: ${HLQ}.OBJ
          - name: cobol_cpyPDS
            value: ${HLQ}.COPY
          - name: bms_cpyPDS
            value: ${HLQ}.BMS.COPY
          - name: SIGYCOMP_V6
            value: IGY.V6R1M0.SIGYCOMP
          - name: cobol_compileParms
            value: LIB
          - name: cobol_dependencySearch
            value: search:${WORKSPACE}?path=MortgageApplication/copybook/*.cpysearch:${WORKSPACE}?path=imports/**/include/bin/*.OBJ
          - name: SDFHCOB
            value: DFH.V4R1M0.CICS.SDFHCOB
          - name: SDFHLOAD
            value: DFH.V4R1M0.CICS.SDFHLOAD
          - name: SDSNLOAD
            value: DSN.V11R1M0.SDSNLOAD
          - name: cobol_dbrmPDS
            value: ${HLQ}.DBRM
          - name: cobol_compileParms
            value: LIB,SOURCE
            forFiles:
              - '**/epscmort.cbl'
          - name: cobol_compileCICSParms
            value: CICS
          - name: cobol_loadPDS
            value: ${HLQ}.LOAD
          - name: SCEELKED
            value: CEE.SCEELKED
          - name: cobol_linkEditParms
            value: MAP,RENT,COMPAT(PM5)
          - name: cobol_compileParms
            value: LIB,SOURCE
            forFiles:
              - '**/epsmlist.cbl'
          - name: cobol_linkEditParms
            value: MAP,RENT,COMPAT(PM5),MAP
            forFiles:
              - '**/epsmpmt.cbl'
          - name: cobol_srcOptions
            value: cyl space(1,1) lrecl(80) dsorg(PO) recfm(F,B) dsntype(library)
          - name: cobol_loadOptions
            value: cyl space(1,1) dsorg(PO) recfm(U) blksize(32760) dsntype(library)
          - name: doLinkEdit
            value: true
        datasets:
        - name: ${cobol_srcPDS}
          options: ${cobol_srcOptions}
        - name: ${cobol_cpyPDS}
          options: ${cobol_srcOptions}
        - name: ${cobol_objPDS}
          options: ${cobol_srcOptions}
        - name: ${HLQ}.DBRM
          options: ${cobol_srcOptions}
        - name: ${cobol_loadPDS}
          options: ${cobol_loadOptions}
      steps:
        - step: copySrc
          type: copy
          target: //'${cobol_srcPDS}(${MEMBER})'
          dependencyCopy:
            - search: ${cobol_dependencySearch}
              mappings:
                - source: '**/*.cpy'
                  dataset: ${cobol_cpyPDS}
        - step: mvsCall
          type: mvs
          pgm: IGYCRCTL
          parm: ${cobol_compileParms}
          dds:
            - {name: SYSIN, dsn: '${cobol_srcPDS}(${MEMBER})', options: shr, input: true}
            - {name: SYSPRINT, options: 'cyl space(5,5) unit(vio) lrecl(133) recfm(f,b) new', log: '${STEP}-${FILE_NAME}.log', logEncoding: '${LOG_ENCODING}'}
            - {name: SYSMDECK, options: 'cyl space(5,5) unit(vio) lrecl(80) recfm(f,b) new'}
            - {name: SYSUT1, options: 'cyl space(1,1) unit(sysallda) new'}
            - {name: SYSUT2, options: 'cyl space(1,1) unit(sysallda) new'}
            - {name: SYSUT3, options: 'cyl space(1,1) unit(sysallda) new'}
            - {name: SYSUT4, options: 'cyl space(1,1) unit(sysallda) new'}
            - {name: SYSUT5, options: 'cyl space(1,1) unit(sysallda) new'}
            - {name: SYSUT6, options: 'cyl space(1,1) unit(sysallda) new'}
            - {name: SYSUT7, options: 'cyl space(1,1) unit(sysallda) new'}
            - {name: SYSUT8, options: 'cyl space(1,1) unit(sysallda) new'}
            - {name: SYSUT9, options: 'cyl space(1,1) unit(sysallda) new'}
            - {name: SYSUT10, options: 'cyl space(1,1) unit(sysallda) new'}
            - {name: SYSUT11, options: 'cyl space(1,1) unit(sysallda) new'}
            - {name: SYSUT12, options: 'cyl space(1,1) unit(sysallda) new'}
            - {name: SYSUT13, options: 'cyl space(1,1) unit(sysallda) new'}
            - {name: SYSUT14, options: 'cyl space(1,1) unit(sysallda) new'}
            - {name: SYSUT15, options: 'cyl space(1,1) unit(sysallda) new'}
            - {name: SYSLIN, dsn: '${cobol_objPDS}(${MEMBER})', options: shr, output: true, deployType: OBJ}
            - {name: SYSLIB, dsn: '${cobol_cpyPDS}', options: shr}
            - {dsn: '${bms_cpyPDS}', options: shr}
            - {dsn: '${SDFHCOB}', condition: '${IS_CICS}', options: shr}
            - {name: TASKLIB, dsn: '${SIGYCOMP_V6}', options: shr}
            - {dsn: '${SDFHLOAD}', condition: '${IS_CICS}', options: shr}
            - {dsn: '${SDSNLOAD}', condition: '${IS_SQL}', options: shr}
            - {name: DBRMLIB, dsn: '${cobol_dbrmPDS}(${MEMBER})', condition: '${IS_SQL}', options: shr, output: true, deployType: DBRM}
        - step: mvsCall
          type: mvs
          condition: '${doLinkEdit}'
          pgm: IEWBLINK
          parm: ${cobol_linkEditParms},SSI=c1f6730e
          dds:
            - {name: SYSIN, options: 'tracks space(5,5) unit(vio) lrecl(80) recfm(f,b) new', instream: " IDENTIFY EPSCMORT('MortgageApplication/c1f6730e')\n "}
            - {name: SYSLIN, dsn: '${cobol_objPDS}(${MEMBER})', options: shr}
            - {ref: SYSIN}
            - {name: SYSLMOD, dsn: '${cobol_loadPDS}(${MEMBER})', options: shr, output: true, deployType: CICSLOAD}
            - {name: SYSPRINT, options: 'cyl space(5,5) unit(vio) lrecl(133) recfm(f,b) new', log: '${STEP}-${FILE_NAME}.log', logEncoding: '${LOG_ENCODING}'}
            - {name: SYSUT1, options: 'cyl space(5,5) unit(vio) lrecl(80) recfm(f,b) new'}
            - {name: SYSLIB, dsn: '${cobol_objPDS}', options: shr}
            - {dsn: '${SCEELKED}', options: shr}
            - {dsn: '${SDFHLOAD}', condition: '${IS_CICS}', options: shr}
            - {dsn: '${SDSNLOAD}', condition: '${IS_SQL}', options: shr}
    
  • LinkEdit.yaml

    #Yaml generated by $DBB_HOME/migration/bin/migrateGroovy.sh
    #    Script source: '/u/kmcgreg/testing/zBuildMigrationDemo/zApp/languages/LinkEdit.groovy'
    #
    #The following fields are marked with 'TODO' and must be filled in manually:
    #    Condition: contains the original condition text which must be modified to fit zBuilder standards
    #    Sources: file patterns matching the USS filenames/locations a language script should build
    #
    #Additionally, migrated variables do not reference other variables. zBuilder provided variables, such as '${HLQ}' and '${WORKSPACE}' must be inserted manually.
    version: 1.0.3
    tasks:
      - language: LinkEdit
        sources:
          - '**.lnk'
        variables:
          - name: linkedit_srcPDS
            value: ${HLQ}.LINK
          - name: linkedit_loadPDS
            value: ${HLQ}.LOAD
          - name: linkedit_objPDS
            value: ${HLQ}.OBJ
          - name: SCEELKED
            value: CEE.SCEELKED
          - name: SDFHLOAD
            value: DFH.V4R1M0.CICS.SDFHLOAD
          - name: SDSNLOAD
            value: DSN.V11R1M0.SDSNLOAD
          - name: linkEdit_parms
            value: MAP,RENT,COMPAT(PM5)
          - name: linkedit_srcOptions
            value: cyl space(1,1) lrecl(80) dsorg(PO) recfm(F,B) dsntype(library)
          - name: linkedit_loadOptions
            value: cyl space(1,1) dsorg(PO) recfm(U) blksize(32760) dsntype(library)
      datasets:
        - name: ${linkedit_srcPDS}
          options: ${linkedit_srcOptions}
        - name: ${linkedit_objPDS}
          options: ${linkedit_srcOptions}
        - name: ${linkedit_loadPDS}
          options: ${linkedit_loadOptions}
      steps:
        - step: copySrc
          type: copy
          target: //'${linkedit_srcPDS}(${MEMBER})'
        - step: mvsCall
          type: mvs
          pgm: IEWBLINK
          parm: ${linkEdit_parms},SSI=c1f6730e
          dds:
            - {name: SYSLIN, dsn: '${linkedit_srcPDS}(${MEMBER})', options: shr, input: true}
            - {name: SYSLMOD, dsn: '${linkedit_loadPDS}(${MEMBER})', options: shr, output: true, deployType: CICSLOAD}
            - {name: SYSPRINT, options: 'cyl space(5,5) unit(vio) lrecl(80) recfm(f,b) new', log: '${STEP}-${FILE_NAME}.log', logEncoding: '${LOG_ENCODING}'}
            - {name: SYSUT1, options: 'cyl space(5,5) unit(vio) lrecl(80) recfm(f,b) new'}
            - {name: SYSLIB, dsn: '${linkedit_objPDS}', options: shr}
            - {dsn: '${SCEELKED}', options: shr}
            - {dsn: '${SDFHLOAD}', condition: '${IS_CICS}', options: shr}
            - {dsn: '${SDSNLOAD}', options: shr}
    

Now that the migration is complete and all of the generated YAML files have been modified, run the migrated steps as a zBuilder lifecycle.

Begin by moving your new YAML files to the $DBB_BUILD directory. Then, replace the existing include section of your $DBB_BUILD/dbb-build.yaml file with the following snippet. This will ensure the new language tasks are picked up by the zBuilder.

---
version: 1.0.0
include: 
  # IMPORTANT!  Copy and configure Languages.yaml and any other
  # language configuration files from # DBB_HOME/samples/languages
  # to your $DBB_BUILD directory before executing zBuilder.
  - file: BMS.yaml
  - file: Cobol.yaml
  - file: LinkEdit.yaml

Next, create a lifecycle to test these languages. Under the lifecycles section, add a tutorial lifecycle that uses the new tasks. The zBuilder-provided tasks will fill out the rest of the lifecycle:

---
version: 1.0.0
...
lifecycles:
  - lifecycle: tutorial
    tasks:
      - Start
      - ScannerInit
      - MetadataInit
      - FullAnalysis
      - BMS
      - Cobol
      - LinkEdit
      - Finish

Before running the new lifecycle, create a dbb-app.yaml file within the zAppBuilds MortgageApplication directory. This will provide file variable overrides for the Language tasks fileBuildRank variable and the newly added doLinkEdit variable.

# dbb-app.yaml
---
version: 1.0.0
application:
  name: MortgageApplication
  tasks:
    # Variable overrides for the Cobol language task
    - task: Cobol
      variables:  
        # Need to build sub-module epsnbrvl.cbl first during cobol builds
        - name: fileBuildRank
          value: 1
          forFiles: "**/cobol/epsnbrvl.cbl"

        # Skip creating a load module for these programs as they will be 
        # statically linked to other programs
        - name: doLinkEdit
          value: false
          forFiles:
            - "**/cobol/epsnbrvl.cbl"
            - "**/cobol/epsmlist.cbl"   

Then, run the lifecycle. You should get a clean build at the end:

~/migration/zAppBuild/samples/MortgageApplication #>$DBB_HOME/bin/dbb build tutorial
IBM Dependency Based Build 3.0.4

BUILD

Lifecycle: tutorial
...
Task: Finish
> Build ended at 20260121.174517.526
> Duration of build : 00 min, 09 sec
> Total files processed : 9
> Build Status : CLEAN