Skip navigation.

Format Builder

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents Index View as PDF   Get Adobe Reader

Importing Meta Data

BEA Format Builder includes the following four utilities that allow you to import COBOL copybooks, and convert a C structure definition into MFL Message Definition.

 


Importing an XML Schema

Format Builder includes a feature that allows you to import an XML Schema representing the desired XML representation of your non-XML document. This can provide you with a jump-start on specifying the format of your non-XML document.

To import an XML schema:

  1. Choose Tools—>Import—>XML Schema Importer. The XML Schema Importer dialog displays.

  2.  
  3. Enter data in the fields as described in the following table:
  4. Field

    Description

    File Name

    Type the path and name of the file you want to import.

    Browse

    Click to navigate to the location of the file you want to import.

    Root Element

    This value will be used as the root element in the transformed XML document. This name must comply with XML element naming conventions

    MFL Field Delimiter Default

    A delimiter is a character that marks the end of the field. The field data continues until the field containing the delimiter character is encountered.

    Action Buttons

    OK

    Imports the XML Schema using the settings you defined.

    Cancel

    Closes the dialog and returns to Format Builder without importing.


     

 


Importing a COBOL Copybook

Format Builder includes a feature that allows you to import a COBOL copybook into Format Builder and create a message definition to transform the COBOL data. When importing a copybook, comments are used to document the imported copybook and the Groups and Fields it contains.

To import a COBOL copybook:

  1. Choose Tools—>Import—>COBOL Copybook Importer. The COBOL Copybook Importer dialog displays.

  2.  
  3. Enter data in the fields as described in the following table:
  4. Field

    Description

    File Name

    Type the path and name of the file you want to import.

    Browse

    Click to navigate to the location of the file you want to import.

    Byte Order

    Big Endian

    Select this option to set the byte order to Big Endian.

    Note: This option is used for IBM 370, Motorola, and most RISC designs (IBM mainframes and most Unix platforms).

    Little Endian

    Select this option to set the byte order to Little Endian.

    Note: This option is used for Intel, VAX, and Unisys processors (Windows, VMS, Digital, Unix, and Unisys).

    Character Set

    EBCDIC

    Select this option to set the character set to EBCDIC.

    Note: These values are attributes of the originating host machine.

    US-ASCII

    Select this option to set the character set to US-ASCII.

    Note: These values are attributes of the originating host machine.

    Other

    The character encoding of the field data.

    Action Buttons

    OK

    Imports the COBOL Copybook using the settings you defined.

    Cancel

    Closes the dialog and returns to Format Builder without importing.

    About

    Displays information about the COBOL Copybook importer including version and supported copybook features.


     

Once you have imported a copybook, you may work with it as you would any message format definition. If an error or unsupported data type is encountered in the copybook, a message is displayed informing you of the error. You can choose to display the error or save the error to a log file for future reference.

 


Importing C Structures

Format Builder includes a C structure importer utility that converts a C structure definition into an MFL Message Definition by generating MFL or C Code output.

 


Starting the C Structure Importer

To start the C Structure Importer:

  1. From the Format Builder main window, choose Tools—>Import—>C Struct Importer. The C Structure Importer dialog displays.
  2. The C Structure Importer dialog opens with MFL specified as the default output and contains the following fields.
  3. Field

    Description

    Input


    Input File

    Enter the path and name of the file you want to import. You can also click the Browse button to navigate to the file you want to import.

    Structure

    This list box is populated with the list of structures found in the input file after it has been successfully parsed.

    Parse

    Click Parse to parse the input file. If successful, the Structure list box is populated with the list of structures found in the input file.

    Output


    Name

    Specify an existing profile either by entering the file name or using the Browse button.

    MFL

    Specifies the data must be compiled on the target machine to generate MFL.

    C Code

    Specifies the data must be compiled on the target machine to generate C code.


     

 


Generating MFL Data

Perform the following steps to generate MFL data.

  1. Enter a file name in the Input File field, or click Browse to select a file.
  2. Click Parse to parse the file.
  3. Upon completion, the Structure list box is populated with the list of structures found in the input file.

  4. Select the desired structure from the Structure drop-down list box.
  5. At this point, you must provide some profile configuration data to generate the MFL directly. You can do this by creating a new hardware profile, or specifying an existing profile.

  6. Specify an existing profile or create a new one by performing one of the following procedures.
  7. Click OK to save your hardware profile changes and return to the C Structure Importer dialog.
  8. Click OK to generate your MFL. If the generation is successful, you are returned to Format Builder with an MFL object listed in the navigation tree. The MFL object reflects the same name as the input file used in the parse operation.
  9. If errors are detected during the generation process, the MFL Generation Errors dialog displays providing you the opportunity to view or file the error log.

  10. Click Display Error Log to view any errors encountered, click Save Error Log to save the error log to the location of your choice, or click Cancel to dismiss the MFL Generation Errors dialog box.

Once you have determined what errors were generated, you can return to the C Structure Importer and repeat the prior steps.

 


Generating C Code

Perform the following steps to generate C code.

  1. Enter a file name in the Input File field, or click Browse to select a file.
  2. Click Parse to parse the file.
  3. Upon completion, the Structure list box is populated with the list of structures found in the input file.

  4. Select the desired structure from the Structure drop-down list box.
  5. Select the C Code option button.
  6. Enter a file name in either the MFL Gen or Data Gen fields, or click Browse to select a file.
  7. Click OK. You will be warned about overwriting existing files and notified about the success or failure of the code generation.
  8. Copy the generated source code to the platform in question and compile and execute it.
  9. Note: You must copy the input file containing the structure declarations as well. Both programs, when compiled, take an argument of the output file name.

  10. Copy the generated MFL or data back to the platform running Format Builder.

 

Skip navigation bar  Back to Top Previous Next