Using Format Builder

     Previous  Next    Open TOC in new window  Open Index in new window  View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Importing Meta Data

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

 


Importing a Guideline XML File

Format Builder includes a feature that allows you to import a guideline XML (gXML) file and convert it into a message definition, which you can modify and customize to suit your needs. gXML is an open specification designed to facilitate exchange of e-commerce guidelines for business documents (like purchase orders, invoices and so on) using XML. gXML version 0.71 is supported in this release.

To import a gXML file:

  1. Choose Tools > Import > EDI Importer. The EDI Importer dialog displays.
  2. Enter data in the fields as described in the following table:
  3. Table 9-1 EDI Importer Options
    Field
    Description
    gXML File Name
    Type the complete path and name of the gXML file that you want to import.
    Browse
    Click to navigate to the location of the gXML file you want to import.
    Action Buttons
    OK
    Imports the gXML file you specified.
    Cancel
    Closes the dialog and returns to Format Builder without importing.
    About
    Displays information about the EDI Importer including the version.

 


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. Enter data in the fields as described in the following table:
  3. Table 9-2 XML Schema Importer Options
    Field
    Description
    XML Schema Definition
    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. Enter data in the fields as described in the following table:
  3. Table 9-3 COBOL Copybook Importer Options
    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. Table 9-4 C Structure Importer Options
    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 is parsed.The list box is empty if the input file is not 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.
    • Specify an existing profile either by entering the file name in the Hardware Profile Name field, or click Browse to select a file. Click Edit to open the hardware profile editor if you need to view or edit the profile parameters.
    • Click New to create a new hardware profile. This opens the Hardware Profile editor loaded with the default parameters. Specify a Profile Name, a description, and modify the primitive data types and byte order to suit your needs.
  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.

 


Importing an FML Field Table Class

The FML Field Table Class Importer facilitates the integration of WebLogic Tuxedo Connector and business process management (BPM) functionality. Tuxedo application buffers are translated to and from XML by the FML to XML Translator that is a feature of WebLogic Tuxedo Connector.

The integration of Tuxedo with BPM functionality requires the creation of the XML that is passed between the WebLogic Tuxedo Connector Translator and the process engine. To create the necessary XML, use the FML Field Table Class Importer and the XML generation feature of Format Tester.

FML Field Table Class Importer Prerequisites

Before starting Format Builder:

  1. Move the field tables associated with the FML buffer from the Tuxedo system to the WebLogic Server/WebLogic Tuxedo Connector environment.
  2. Use the weblogic/wtc/jatmi/mkfldclass utility to build Java source code representing the field tables. For information about FML Field Table Administration, see the WebLogic Server documentation.
  3. Compile the source code. The resulting class files are called fldtbl classes because they implement the FldTbl interface. These classes must be moved to a location specified in the Format Builder CLASSPATH.

The WLI_HOME\samples\di\fml directory contains several fldtbl class fields that you can use as samples. These samples allow you to start Format Builder without having to completing the previous three steps.

Note: Because most users perform these steps when configuring WebLogic Tuxedo Connector, these class files may already exist.

Sample FML Field Table Class Files

The following table provides a listing and descriptions of the sample files installed for the FML Field Table Class Importer. All files are in the WLI_HOME\samples\di\fml directory.

Table 9-5 FML Field Table Class Sample Files
Field
Description
bankflds.class
Compiled source file that serves as input to the FML Field Table Class Importer
bankflds.java
fldtbl source file generated by the mkfldclass utility
crdtflds.class
Compiled source file that serves as input to the FML Field Table Class Importer
crdtflds.java
fldtbl source file generated by the mkfldclass utility
tBtest1flds32.class
Compiled source file that serves as input to the FML Field Table Class Importer
tBtest1flds32.java
fldtbl source file generated by the mkfldclass utility

Creating XML with the FML Field Table Class Importer

To create an XML document with the FML Field Table Class Importer:

Note: If you create Java classes using WebLogic Tuxedo Connector, you can place the .class files in the \ext directory. You can then populate the Available Fields list automatically from the FML Field Table Class Importer dialog box.
  1. Choose Tools > Import > EDI Importer. The FML Field Table Class Importer dialog displays.
  2. Enter data in the fields as described in the following table:
  3. Table 9-6 FML Field Table Class Importer Options
    Field
    Description
    Class Names
    Type the name of the fldtbl class file to be processed.
    Because a single FML buffer may contain fields from several field tables, you can enter one or more fldtbl class name files in the Class Names field. Items in the list should be separated by commas. Name are not required to include the .class extension.

    Note: If any of the listed classes are not fldtbl classes created by the weblogic/wtc/jatmi/mkfldclass utility, or if they are not included in the Format Builder CLASSPATH, then an error dialog box is displayed.

    Load
    Click Load to display names of the fields from the field tables in the Available Fields list.
    FML Field Selector
    Available Fields
    Displays the list of names from the field tables. Select the desired fields from the Available Fields list and click Add.
    The Available Fields list does not allow duplicate names. Even if the name of a field appears in different field tables, it is included only once in the list.
    Selected Fields
    Displays the list of selected fields.
    To remove fields from this list, select the fields and click Remove.
    Action Buttons
    Add
    Moves the selected field from the list of Fields Available, to the Selected Fields list.
    Remove
    Removes the selected field from the list of Selected Fields, to the Fields Available list.
    OK
    Click OK after completing the list of selected fields. The dialog box closes and the name of the generated MFL is added to the Format Builder navigation tree. The selected fields are listed in the order in which they appear in the Selected Fields list.
    Cancel
    Closes the dialog and returns to Format Builder without importing.

  4. Edit the created MFL document to specify the order and number of occurrences of the fields in the XML document to be passed to the WebLogic Tuxedo Connector FML/XML Translator from business process management (BMP).
  5. Choose Tools > Test to display the Format Tester tool.
  6. From the Format Tester menu bar, choose Generate > XML to create an XML document that conforms to the MFL document in Format Builder.
  7. Edit the data content of the fields in the XML document as desired.
  8. From the Format Tester menu bar, choose File > Save XML to save the XML document in a file with a specified name and location.

The created XML can be imported and used in business process management functions by using the XML instance editor. For information about importing XML, see the BPM documentation.


  Back to Top       Previous  Next