WebSphere Message Broker, Version 8.0.0.7
Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS
See information about the latest product version
See information about the latest product version
Message Sets: Importing from COBOL copybooks
This topic describes
how to create a new message definition from a COBOL data structure
using the New Message Definition File wizard in the WebSphere® Message Broker Toolkit.
Tip: In WebSphere Message
Broker Version 8.0 and
later, message model schema files contained in applications
and libraries are the preferred way to model messages for most data
formats. Message sets are required if you use the MRM or IDOC domains.
For more information about message modeling, see Message modeling concepts. For information about
how to import a COBOL copybook for use by DFDL domain, see Creating a DFDL schema file by using the New Message Model wizard. For an overview
of how to use the COBOL importer, go to the IBM® Rational® Application Developer Information
Center and search for COBOL Importer overview.
Before you start:
Complete the following tasks:
- Message Sets: Creating a message set
- Importing files from the file system into the WebSphere Message Broker Toolkit
Be aware of the following points:
- The wizard can import COBOL files with .cbl, .ccp, .cob and .cpy extensions. If your source file has a different extension, you must rename it before attempting to import it.
- If the message set to which you are adding the new message
definition file does not have a Custom Wire Format (CWF) layer,
or a Tagged/Delimited String (TDS) format layer, only the logical
information appears in the model.
You can add the physical layer to the message set before or after importing a COBOL data structure but ensure that you add the physical layer before you import the data structure to ensure that it is populated with settings from the COBOL copybook.
- You can import a COBOL data structure from the command line using mqsicreatemsgdefs.
- The copybook must not contain field names that are COBOL reserved keywords.
- The COBOL importer can only import files that have file names of 60 characters long or less. If you attempt to import a COBOL file with a name longer than 60 characters, the COBOL importer fails with the message IWAA0652E: File name cannot be longer than 60 characters.
The COBOL importer requires 32-bit versions of the Linux operating system libraries. Some of these libraries are not installed by default with Red Hat Enterprise Linux V6 64-bit. Install the 32-bit package redhat-lsb-4.0-2.1.el6.i686 from the Linux install disk or package repository. For example, from a terminal window enter the following command:
yum install redhat-lsb-4.0-2.1.el6.i686
The following steps cover creating a new message definition file and overwriting the contents of an existing file.
To create a message definition file from a COBOL data structure:
When you have completed importing the COBOL file using the wizard:
- Carefully check for any errors in the report that is created when the file is imported. You can find this report in the log directory within the project containing the message definition that you have attempted to create. The report has a .cobol.report.txt file extension, prefixed with the name that you specified for the new message definition file.
- Review the messages shown in the WebSphere Message Broker Toolkit task list to check whether any new warnings or errors have appeared.