Skip Headers
Oracle® Application Server Adapter for IMS/DB User's Guide
10g Release 2 (10.1.2)
B15806-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

A Advanced Tuning of the Metadata

Oracle Studio enables you to define adapter interactions such as Outbound and Inbound interactions. In addition, Oracle Studio defines input and output structures used for these interactions. The interactions and input and output structures are maintained as metadata in the Metadata tab of Oracle Studio.

This appendix contains the following section:

Metadata for the IMS/DB Data Source

Using Oracle Studio, perform the following steps to maintain the metadata for the IMS/DB data source:

  1. From the Start menu, Programs, Oracle, and then select Studio.

  2. Select the computer defined in "Setting Up the IBM OS/390 or z/OS Platform in Oracle Studio".

  3. Expand the Bindings node.

  4. Expand the NAV binding node.

  5. Expand the Data sources node to display the data sources.

  6. Right-click the IMS/DB data source and select Edit Metadata to open the Metadata tab.

    The Metedata tab is shown in the following figure:

    Description of md_persp.gif follows
    Description of the illustration md_persp.gif

  7. Right-click the table you want to view in the Metadata Explorer and select Edit.

The metadata editor opens, displaying the General tab, with general table details. The following tabs are used to view and edit the metadata:

General Tab

Use the General tab to maintain information about the whole table, such as the table name and the way the table is organized.

The General tab is shown in the following figure.

The adapter metadata General tab
Description of the illustration addGen.gif

The General tab comprises fields, as listed in the following table:

Field Description
Table name Specifies the name of the table.
Comment An optional description of the table.
Data File Specifies the location of the file containing the table.
Organization Specifies how the record represented by the table is organized. The options that are displayed depend on the record. The following options are available:

Index

Sequential

Relative: Used with RRDS files. Access to a specific record number of a relative file is performed by using a pseudo column to specify the record position. The hash symbol (#) is used to specify a pseudo column. For example:

SELECT * FROM colleges WHERE # = 6
Record format Specifies how the record, represented by the table, is formatted. The options that are displayed depend on the record. The IMS/DB records have a fixed format.
Maximum record length Specifies the record length.
Filter Expression A WHERE clause. This clause is added to every query accessed using this metadata. The filter is specified without the WHERE keyword. Specify a filter when more than one logical table is stored in the same physical file.

IMS/DB specific commands are displayed in the DB Command screen, which you open by clicking DB Command.

The DB Command screen is shown in the following figure.

The DB Command window.
Description of the illustration addDBCmd.gif

The information displayed is generated automatically when the metadata is generated and should not be modified.

Columns Tab

Use the Columns tab to specify metadata describing the columns of the table. The Columns tab is shown in the following figure:

Description of addcol.gif follows
Description of the illustration addcol.gif

The Columns tab comprises fields, as listed in the following table:

Field Description
Column Name The name of the column.
Data Type The data type of the data the column contains. Selecting this field displays a list of the avaiable data types.

See Also: "Data Type Mapping" for details about the available data types

Size The size allocated for the column.
Scale The definition depends on the data type. For decimal data types this value is the number of digits to the right of the decimal place. This number must not be greater than the number of digits. The default value is 0. For scaled data types this value is the total number of digits. The number must be negative.
Offset An absolute offset for the field in a record.

The Column Properties relate to the selected column.

Alias A name used to replace the default virtual table name for an array. Virtual table names are generated by appending the array name to the record name. Thus, when an array includes another array the name of the nested array is the name of the record and the parent array and the nested array. When the default generated virtual table name is too long to be usable, specify an Alias to replace the long name.
Array dimension The maximum number of occurrences of the group of columns that make up the array.
Comment A comment about the specific column.
OnBit The position of the bit in a BIT field and the starting bit in a BITS field.
Empty value The value for the field during an insert operation, when a value is not specified.
Null value The null value for the field during an insert operation, when a value is not specified.
DBcommand IMS/DB-specific commands for the column. The information displayed is generated automatically when the metadata is generated and should not be modified.
Nullable The current field can contain NULL values.
Updateable The current field can be updated.
Explicit select The current field is not returned when you run a SELECT * FROM... statement. To return this field, you must explicitly ask for it (in a query such as SELECT NATION_ID, SYSKEY FROM NATION where SYSKEY is a field defined with Explicit Select).

Note: You cannot include the asterisk (*) in a query where you want to retrieve a field defined with Explicit Select. That is, a statement such as:

SELECT *, SYSKEY FROM NATION will not return SYSKEY.

You can disable this attribute by specifying the disableExplicitSelect attribute in Oracle Studio, in the properties for the data source.

Auto increment The current field is updated automatically by the data source during an INSERT statement and should not be explicitly specified in the INSERT statement. The INSERT statement should include an explicit list of values. This attribute is used for fields such as an order number field whose value is incremented each time a new order is entered to the data source.
Hidden The current field is hidden from users.

Indexes Tab

Use the Indexes tab to specify metadata describing the indices of a table.


Note:

The Indexes tab contains information only if the Organization field in the Table tab is set to Index.

The Indexes tab is shown in the following figure.

The data source metadata Columns tab
Description of the illustration addInd.gif

The Indexes tab comprises fields, as listed in the following table:

Field Description
Name The names of existing indexes for the current table.
Order The ordering of the rows retrieved by the index.
DB Command IMS/DB-specific commands for the index. The information displayed is generated automatically when the metadata is generated and should not be modified.
Comment An optional comment on the selected index.
Type Indicates the type of the index. The following types are available:

Unique: Indicates that the current index is unique.

Clustered: Indicates that the current index is clustered.

Hierarchical: Indicates that the current index is hierarchical.

Hashed: Indicates that the current index is hashed.


Statistics Tab

Use the Statistics tab to update statistics for a table. The Statistics tab is shown in the following figure:

The data source metadata Statistics tab.
Description of the illustration addStat.gif

The Statistics tab comprises fields as listed in the following tables:

Field Description
No. of rows The approximate number of rows in the table. If the value is -1, then the number of rows in the table is unknown (a value was not supplied and the update statistics utility was not run to update the value). A value of 0 indicates that this table is empty.
No. of blocks The approximate number of blocks in the table.

Note: If neither the number of rows nor the number of blocks is specified for a table, queries over the table might be executed in a nonoptimal manner.


Use the Columns group box to specify cardinality for each of the columns in the table:

Field Description
Column name The columns in the table.
Cardinality The number of distinct values for the column. If the value is -1, the number of distinct values for the column is unknown (a value was not supplied and the update statistics utility was not run to update the value). A value of 0 indicates that there are no distinct values for the column.

Use the Indexes group box to specify cardinality for the columns in each of the indexes in the table:

Field Description
Indexes and segments The indexes and segments in the table.
Cardinality The number of distinct key values in the index. If the value is -1, the number of distinct key values in the index is unknown (a value was not supplied and the update statistics utility was not run to update the value). A value of 0 indicates that there are no distinct key values in the index.

Generating Statistics

Click Update in the Statistics tab to generate updated statistics for the table. The Update Statistics screen is displayed as shown in the following figure.

The Update Statistics window.
Description of the illustration addStat1.gif

The following tables list the fields that are used to update statistics:

Use the Type group box to specify the following:

Field Description
Estimated An estimation of the amount of statistical information returned.
Estimated with rows An estimation of the amount of statistical information returned. The estimate includes an estimation of the number of rows in the table. Specify the number in the text box. This number is used to shorten the time to produce the statistics, assuming that the value specified here is the correct value, or close to the correct value.

Use the Resolution group box to specify the following:

Field Description
Exact The exact statistical information returned. Note that this can be a lengthy task and can lead to disk space problems with large tables.
Default Only information about the table and indexes is collected. Information for partial indexes and columns is not collected.
All columns and indexes Information about the table, indexes, partial indexes and columns is collected.
Select columns and indexes Enables you to select the columns and indexes for which you want to collect statistics. In the enabled list of columns or indices left click those columns you want included (you can use shift-click and control-click to select a number of columns or indices).

Source Tab

The Source tab displays the XML representation of the metadata.

Metadata for the Back-end Adapter

Use Oracle Studio to maintain the metadata for the IMS/DB adapter.

  1. From the Start menu, select Programs, Oracle, and then select Studio.

  2. Select the computer defined in "Setting Up the IBM OS/390 or z/OS Platform in Oracle Studio".

  3. Expand the Bindings node.

  4. Expand the NAV binding node.

  5. Expand the Adapters node to display the adapters.

  6. Right-click the IMS/DB adapter in the Configuration Explorer and select Edit Metadata to open the Metadata tab.

  7. Right-click the interaction in the Metadata Explorer you want to view and select Edit.

The metadata editor opens, displaying the General tab, with general table details. The following tabs are used to edit the metadata:

General Tab

Use the General tab to maintain information generally describing the adapter and the connection to it.

The General tab is shown in the following figure:

The adapter metadata General tab
Description of the illustration md_ad1.gif

The General tab comprises fields as listed in the following table:

Field Description
Adapter definition name Specifies the name of the adapter definition.
Description Specifies an identifying description of the adapter.
Authentication mechanism Specifies the authentication to access the adapter. The available mechanisms are:

kerbv5

none

basic password

Max request size Specifies the maximum size in bytes for an XML request or reply. Larger messages are rejected with an error.
Max active connections Specifies the maximum number of simultaneous connections for an adapter.
Max idle timeout Specifies the maximum time, in seconds, that an active connection can stay idle. After that time, the connection is closed.
Adapter Specifications Specifies the adapter-specific properties for an interaction. The IMS/DB back-end adapter does not have any adapter-specific properties.

Interaction General Tab

Use the Interaction General tab to define the general details of the interaction in addition to its input and output definitions.

The Interaction General tab is shown in the following figure:

The adapter metadata Interaction tab
Description of the illustration md_ad2.gif

The Interaction General tab comprises fields, as listed in the following table:

Field Description
Interaction name Specifies the name of the interaction.
Description Provides a descriptive identifier for the interaction.
Mode Determines the interaction mode. The following interaction modes are available:

sync-send-receive: The interaction sends a request and expects to receive a response.

sync-send: The interaction sends a request and does not expect to receive a response.

sync-receive: The interaction expects to receive a response.

async-send: The interaction sends a request and processing then continues asynchronously, without regard to the request. This mode is used for inbound interactions.

Input record Identifies an input record.
Output record Identifies an output record for the results of an interaction.

Interaction Advanced Tab

Use the Interaction Advanced tab to define advanced interaction parameters, such as the SQL statement type and properties, manual query adjustments, and table properties.

The Interaction Advanced tab is shown in the following figure:

The adapter metadata Interaction Advanced tab
Description of the illustration md_ad2a_new.gif

The Interaction Advanced tab comprises fields and uses, as listed in the following table:

Field Description
Query Type The SQL statement query type.
Table/Column Definition The SQL statement table and column selection area.
Manual Query Editing The SQL statement manual editing area.
Interaction Properties The interaction properties.
Parameters The selected table fields and field parameters.

Schema General Tab

Use the Schema General tab to define the general details of the input and output record structures for the interaction.

The Schema General tab is shown in the following figure.

The adapter metadata Schema General tab
Description of the illustration md_ad3.gif

The Schema General tab comprises fields, as listed in the following table:

Field Description
Schema name The name of the adapter.
Version The schema version.
Header A C header file to map between the data structure and the adapter.

Schema Record Tab

Use the Schema Record tab to define the input and output record structures for the interaction.

The Schema Record tab is shown in the following figure.

The adapter metadata Schema Record tab
Description of the illustration md_ad4.gif

The Schema Record tab comprises fields, as listed in the following table:

Use the Fields List area to define single data items within a record.

Field Description
Name Specifies the name of the field.
Type The data type of the field. The following are valid data types:
  • Binary

  • Boolean

  • Date

  • Double

  • Float

  • Int

  • Long

  • Numeric

  • Short

  • String

  • Time

  • Timestamp

  • XML

Length The size of the field including a null terminator, when the data type supports null termination.


See Also:

Appendix B, "IMS/DB Back-end Adapter Data Type Support" for details about the mapping from COBOL datatypes to IMS/DB back-end adapter datatypes


Note:

Use the Specifications box to specify field properties.

Source Tab

The Source tab displays the XML representation of the adapter metadata.