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

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:

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.
  • Linux platformThe 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:

  1. Switch to the Broker Application Development perspective.
  2. Open the New Message Definition File wizard by clicking File>New>Other from the WebSphere Message Broker Toolkit menu. A window opens in which you can select a wizard.
  3. Expand Message Broker - Message Set Development, select Message Definition File, and click Next. The New Message Definition File wizard opens.
  4. Click COBOL file, then click Next.
  5. Step through the remainder of the wizard supplying the details as required.

    For more information, see Message Sets: New message definition file wizard: Create a new message definition file from a COBOL file.

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.
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2016Copyright IBM Corporation 1999, 2016.

        
        Last updated:
        
        Last updated: 2016-05-23 14:46:39


Task topicTask topic | Version 8.0.0.7 | ad02930_