Importing from a COBOL Source File or COBOL Syntax File

  1. With a catalog open in the Relativity Designer, on the File menu, click Import COBOL FDs.

    The COBOL FD Importer tab is displayed.

  2. If the current data source is a Client/Server data source, the Remote tick-box is selected: this allows you to select files on the Data Server machine during file import selection. If you want to select files on your local machine for import, ensure Remote is not selected.
  3. In the Import FDs From field, select the type of import:
    • Import from a COBOL source (.cbl) file:
      CAUTION:
      Only use a source file that contains well-formed COBOL syntax that compiles cleanly.
      Note: The New CST file compiled from COBOL source option is only available if you have Visual COBOL or Enterprise Developer installed.
      1. In the Import FDs From field, select New CST file compiled from COBOL source (if you have Visual COBOL or Enterprise Developer installed) or New RST file compiled from COBOL source (if you have older or no Micro Focus COBOL development products installed).
      2. To the right of the File to Import field, click (Select file to import), then use the Open dialog box to select a .cbl file.
      3. If necessary, enter the appropriate compiler (directive) options in the Compilation Options field.
      4. If the FD within the source includes references to copy files, to the right of the Source/Copy Path field, click (Select file to import) and select the folder(s) in which the copy files reside.
        Note: If you are having issues with the import, you may be requested to perform it with Keep Temporary Files after Import selected, which retains the temporary files created during the import process; SupportLine can use the .lst and .err.xml temporary files to help troubleshoot import issues.
    • Import from a COBOL syntax file:
      Note: The Existing CST file option is only available if you have Visual COBOL or Enterprise Developer installed.
      1. In the Import FDs From field, select Existing CST file or Existing RST file.
      2. To the right of the File to Import field, click (Select file to import), then use the Open dialog box to select a compatible COBOL syntax file for the selected COBOL language.
  4. Click Read File and Record Descriptions.

    If you selected a COBOL source file, it is compiled, and the FD information extracted to a COBOL Syntax Tree (CST) file or a Relativity Table (RST) file depending on the Micro Focus COBOL development product installed. Relativity can then read the FD information from the resulting file.

    A further two tabs are displayed. The Items to Import tab displays the FDs found in the selected file, and the Messages tab contains output from the extractor process.

  5. In the Items to Import tab, select the file definition(s) to import.
    Note: If you need to import other COBOL items from the source that are not part of the file definition (e.g. working-storage items), click Show Advanced Import Options, then select from the additional items displayed.
  6. Click Add to Catalog.

    The selected file definitions are now displayed in the Catalog Explorer.