From a stored procedure

About this task

Use the Database Interface Designer to generate type trees from the parameters of stored procedures.

An example of the Generate Type Trees from Stored Procedures dialog follows, along with a table describing its fields and their descriptions.

   
Database Name (Display only) This is the name of the database from which you want to generate a type tree. (This name is automatically inserted based upon your selection in the Navigator.)
Stored Procedures This list displays all of the stored procedures that have been defined in this database. Select one or more from this list.

The list of stored procedures includes stand-alone procedures by default. (Procedures that are parts of a package are not listed.) If you need a procedure that is part of a package (whether this functionality is available is dependent upon your database), you may need to insert it into this list before selecting it. To insert a packaged stored procedure, right-click in the list, select Insert, and type the desired name. Use the following format: schema . package . procedure.

File name This field displays a system-generated file name based upon the database selection in the Navigator. The default value is the database name with a type tree extension (.mtt) and a default path.

To change any of this information, click the browse button.

Overwrite file This check box determines whether you want to replace the existing type tree file (MTT) upon saving it. The default value is disabled.
Override type This check box determines whether to replace existing types with matching, newly generated types and to add any non-matching new types to the type tree file (MTT). This is useful when you want to add types for additional stored procedures into an existing type tree. The default value is enabled.
Row group format This list displays options to determine the row format in the generated type tree. The default value is Delimited.
Option
Description
Delimited
Select this option to create rows delimited with a pipe character (|) or some other user-defined selection. This is the preferred option if you are using large column widths where the values may be smaller than the width of the columns. The pipe character is the default selection.
Fixed
Select this option to create rows of fixed size in the generated type tree. There are certain situations in which you would want to select Fixed.
  • The query result contains a large number of rows where each row consists of small, fixed-length fields. In this situation, delimiters are unnecessary and they also consume memory.
  • You need to append fields in the output. This may be true if multiple fields have some meaning when concatenated together.
Delimiter This is the value for the delimiter to be used when generating this type tree. For a list of available symbols, click the browse button. The Symbols dialog appears, allowing you to select the desired value. The default value is a pipe character (|).
Terminator This is the value for the terminator to be used when generating this type tree. For a list of available symbols, click the browse button. The Symbols dialog appears, allowing you to select the desired value. The default value is <CR><LF >.
Release This is the value for the release character to be used when generating this type tree. For a list of available symbols, click the browse button. The Symbols dialog appears, allowing you to select the desired value. The default value is an exclamation point (!).
Override Column Definitions (For ODBC only) This check box indicates whether the database driver (with the check box disabled) or a command line override (with the check box enabled) is used to interpret columns. The default value is disabled.

For more information about this field, see the adapter-specific documentation in each adapter reference guide.

Generate type trees in 1.4.0 format (For Oracle adapter only) This check box determines whether you can generate type trees that are compatible with Version 1.4.0 maps. You might enable this functionality if you have legacy 1.4.0 maps that you want to maintain for some reason. The default value is disabled.

For more information about this field, refer to adapter-specific documentation in each adapter reference guide.

Represent date/time columns as text items This check box determines whether to automatically format this information in its database-specific date and time format (enabled) or as a text string (disabled).

If you enable this check box (generating date and time as a text string), you may have to use either the TEXTTODATE or TEXTTOTIME function in a map rule to convert the text string to the database-specific date and time format.

If you are generating new type trees, make sure this check box is disabled. The default is disabled.

Note: Because of adapter-specific differences in date and time formats, see the adapter-specific instructions in each adapter reference guide.
Treat text item as This list displays the languages available in which to handle text items. The default value is Western.

To generate a type tree from a stored procedure:

Procedure

  1. In the Navigator, highlight the icon of the database containing one or more stored procedures from which you want to generate a type tree.
  2. From the Database menu, click Generate Tree From > Procedure.

    or

    In the Navigator, right-click the database and select Generate Tree From > Procedure.

    The Generate Type Tree from Stored Procedures dialog appears, including a list of stored procedures.
  3. If you need to add a stored procedure because it is not displayed in the Stored Procedures list, you must insert it following the instructions provided in the Note below.

    or

    If you see one or more stored procedures in the Stored Procedures list that you want to select, if it is one, select it; if it is multiple procedures, press either Shift or Ctrl and click the desired stored procedures.
    Note: The list of stored procedures includes stand-alone procedures by default. (Procedures that are parts of a package are not listed.) If you need a procedure that is part of a package (whether this functionality is available is dependent upon your database), you may need to insert it into this list before selecting it. To insert a packaged stored procedure, right-click in the list, select Insert, and type the desired name. Use the following format: schema.package.procedure.
  4. To create a new type tree, in the File name field, specify the path and name (with an .mtt extension).

    or

    Click the browse button to select a type tree from the Save As dialog. Highlight it and click OK.

  5. Specify the remaining options as desired. Refer to context-sensitive help for field-specific information.
  6. Click Generate.
    The Database Interface Designer and Type Tree Maker produce a type tree corresponding to the selected stored procedure(s).

Results

The generated type tree is represented in the Navigator with the stored procedure icon next to the name.