Using the Smart code converter

This section describes the steps required to convert 68/74 COBOL Standard code to 85 COBOL Standard using the Smart code converter. The Smart code converter can be accessed from the tile on the welcome page.

Before you begin

  • Ensure that you have installed the AI code assistant to leverage the AI capabilities of the Smart code converter.
  • It is recommended that you run a load library or application scan and save the report to a project. This enables CUAZ to determine the compilation method used for the source programs and to identify which programs require conversion.
Note: The Smart code converter does not support code conversion for copybooks. To convert copybooks to 85 COBOL Standard syntax, follow the procedure in Fixing compilation and runtime errors using AI code assistant.

About this task

You can use the Smart code converter to perform code conversion for either of the following:

Procedure

  1. Select the Smart code converter tile on the welcome page.
  2. Select an existing project or create a new project to convert.
    • For existing project, update the project configuration information by selecting Add source from the Side Bar or by editing the project configuration file.
    • For new project,
      1. Enter the project configuration information in the Create a new project pop-up.
      2. Specify the compilation method used for the original programs.
      Note:
      • To use the AI code assistant for code conversion, you must save the programs to a local folder and specify a mainframe-to-local folder mapping for the source file location while adding or updating the project configuration information.
      • CUAZ will assume that all the programs within a project are compiled with the same compilation method. If you are not sure which compilation method was used, it is recommended that you run a load library scan and save the report to the same project as the Smart code converter project.
      • If you select None of the above as the compilation method, CUAZ assumes that all programs are already updated to the 85 COBOL Standard syntax.

    The Side Bar displays the project and the datasets containing the source programs.
  3. Identify the programs that require conversion from the DATASETS section in the Side Bar. The programs that require code conversion are flagged with the Older language level syntax indicator .
  4. Hover over each program and select + to add it to the CONVERT section.
    Tip:
    • For best results, perform code conversion on one program at a time.
    • Ensure that auto approve is turned off in the AI code assistant. Review and validate all proposed changes before approving them.
    • Ensure you maintain a backup of the original source program in case you need to revert to the previous version.
    • If you want to modify the project configuration information at any point after completing the initial steps, see Editing the project configuration file.
  5. Select Convert syntax to start the conversion.

Results

The Smart code converter analyzes the original code and displays a side-by-side comparison highlighting the differences between the original code with old syntax and the converted code with updated syntax.

Programs with updated syntax that require review are indicated with the Syntax updated icon . The converted programs are automatically copied to their original location on the mainframe when you save the file.