Adding a COBOL copybook as a DFDL schema

You can add a COBOL copybook as a DFDL schema file and apply it to the messages. This utility helps you to add a schema with a valid format and to specify elements and values.

Before you begin

Review the following considerations as you might want to edit the copybook before you import it:

  • The COBOL copybook must follow the standard format, for example, statements must be between columns 6 and 72.
  • You can add objects that are labeled as 01.
  • You cannot add if the copybook certain keywords such as TEXT and some characters such as TAB.
Note: If adding the copybook fails, edit the copybook before you select it to add again.

About this task

You can add the COBOL copybook on a system that runs on Windows or Linux, but not on Mac OS. On 64-bit Red Hat Enterprise Linux and Ubuntu Linux (both 32-bit and 64-bit), additional operating system installation steps are required; see the help for IBM® Rational® Developer for z Systems®: Features that use the COBOL importer do not work properly.

Procedure

  1. In the Schema Library view of the Architecture School perspective, click Add, then click Other > DFDL Schema from the menu.

    Adding the DFDL schema

    The New DFDL Schema window is displayed.
    The New DFDL Schema dialog.
  2. In the New DFDL Schema window, click Change.
    The Select Location dialog displays.
    The Select Location dialog.
  3. In the Select Location dialog, enter a full path to the file that contains the DFDL schema or click Browse, browse to the file, and click Open.
  4. Click OK when the correct path is displayed.

    The DFDL Schema Library lists the COBOL copybook added.Loaded DFDL file

    Note: The new DFDL schema contains a reference to a file named CobolDataDefinitionFormat.xsd, which is added automatically to the project_folder/IBMdefined folder. If you copy or move the new DFDL schema file to a new location, be sure to also copy or move the CobolDataDefinitionFormat.xsd file and keep it in the same relative position to the schema file.

What to do next

You can now apply this DFDL schema to a messaging action as shown:

Apply the schema to a messaging action