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
-
In the Schema Library view of the Architecture School perspective, click
Add, then click from the menu.
The New DFDL Schema window is displayed.
-
In the New DFDL Schema window, click Change.
The Select Location dialog displays.
- 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.
-
Click OK when the correct path is displayed.
The DFDL Schema Library lists the COBOL copybook added.
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.