Preparing for COBOL data generation

Prepare the COBOL file for generating test data.

Note:

If you already have a listing file and corresponding Load Library location with the built binary program, then proceed to the COBOL data generation step.

Set up the COBOL file for testing using DWARF

As a prerequisite to using Z Validation Assistant, compile and link to build the re-factored COBOL program with TEST(DWARF) provided as a compiler option.

Z Validation Assistant needs:
  1. The compiler listing of the built program that is imported into the VS Code COBOL project as a text file (non-binary).
  2. Knowledge of the location of the Load Library of the binary program that results from the build process.
  3. COBOL prepared for transformation as described in these instructions.

2.4.0+Prepare COBOL for test data generation

This section describes the optional procedure for preparing the COBOL file for testing. This is an alternative method for compiling the COBOL and linking the listing file.

Prerequisites:

  • DBB must be installed on the z/OS® system.
  • Complete the Setting up the user build instructions.
  • Add the --debug option to execute in DWARF mode by updating the zapp.yaml file under profiles > buildScriptArgs as follows:
    Example:
    buildScriptArgs:
    - "--userBuild"
    - "--debug"
    - "--workspace ${zopeneditor.userbuild.userSettings.dbbWorkspace}"
    - "--application ${application}"
    - "--hlq ${zopeneditor.userbuild.userSettings.dbbHlq}"
    - "--outDir ${zopeneditor.userbuild.userSettings.dbbLogDir}"
    - "--dependencyFile ${dependencyFile}"
Note: Enabling the Z Validation Assistant > Prepare COBOL For Test Data Generation: User Build Time Configuration setting in workspace settings allows you to set the timeout for the user build process.

Limitation

If you clicked the Cancel button or an error occurs, then wait for the timeout to expire before initiating the setup process again.

Procedure

Complete the following steps to prepare the COBOL file for testing:

  1. Right-click the COBOL file, and select watsonx Code Assistant for Z > Prepare COBOL for Test Data Generation.
  2. The process initiates, displaying status messages in the bottom-right corner of the screen.
  3. Upon successful completion, a confirmation message appears.
  4. The COBOL file is automatically linked with its corresponding listing file, eliminating the need for manual linking.