Select a Relationship

To edit or create a relationship, select Option 6.2 Relationships from the Main Menu.

You can also select Option 6 DEFINITIONS to display the Choose a Definition Option menu (see Choose a Definition Option) and select Option 2 RELATIONSHIPS. In either case, the Choose a Relationship panel is displayed.

Figure: Choose a Relationship

---------------------------- Choose a Relationship ----------------------------
OPTION ===>                                                   SCROLL ===> PAGE 

  1  CREATE   - Create a Relationship for Specified Parent or Child Table
  2  MODIFY   - Modify a Relationship for Specified Child Table
  3  LIST     - List All Relationships for Specified Table

Specify Table Name (Child for OPTION 2, Parent or Child for OPTIONS 1 and 3)
  Creator ID ===> FOPDEMO                                               >>  
  Table Name ===> CUSTOMERS                                             >>  

Specify Relationship Name (OPTIONS 1 and 2)
  Relationship Name ===>                                                   >> 

Specify Relationship Type (OPTIONS 2 and 3)
  Relationship Type ===>                      (P|0-OPTIM, D-DB2, I-IMS, A-All)

Use '_' for DB2 LIKE character ===> NO        (Y-Yes, N-No)
Note: You can also display this panel by entering the CREATE RELATIONSHIP command from the Select Tables/Views for AD panel or the Specify Relationship Usage panel while editing an Access Definition.

The Choose a Relationship panel allows you to create, modify, and select relationships. To use this panel, select an option and provide the needed information. You can type the necessary information on the panel or use DB2® LIKE syntax.

Panel Options

The options on the Choose a Relationship panel include:

1 - CREATE
Create an Optim™ relationship involving a specific table. For this option, you must provide the name of one table in the relationship and may also provide Relationship Name. The specified table can be either the parent or child in the relationship.

After you specify a table name or select one from a selection list, the Create a Relationship panel is displayed. That panel is described in Create a Relationship.

2 - MODIFY
Modify an Optim Relationship or browse a DB2 relationship. For this option, you must indicate the Relationship Type and Relationship Name.

After you indicate the Relationship Type and type a Relationship Name or select one from a selection list, the Modify Relationship panel (for an Optim relationship) or the read-only Browse Relationship panel (for a DB2 relationship) is displayed.

3 - LIST
Use this option to obtain a selection list of relationships for one or more specified tables. For this option, you must indicate the Relationship Type and Table Name.

Once you indicate the Relationship Type and supply a Table Name by typing it on the panel or selecting a table from a list, the Select Relationship panel is displayed (refer to Relationship Selection List). Select a table from the list to display the Modify Relationship panel (for an Optim relationship) or the read-only Browse Relationship panel (for a DB2 relationship).

Panel Prompts

The prompts on the Choose a Relationship panel include:

Specify Table Name
Together, Creator ID and Table Name make up the fully qualified name of the database table. You can enter an explicit value, DB2 LIKE syntax, or blanks for these prompts in any combination.
Creator ID
The Creator ID for the table for which the relationship is being created or modified. The default is the previously entered value or the TSO ID of the current user if a Creator ID has never been specified. Specify 1 to 128 characters. To create or edit a generic relationship, type an asterisk at this prompt. (Refer to Edit a Generic Relationship for details).
Table Name
The name of the table for which the relationship is defined or modified. Specify 1 to 128 characters.
Note: See Naming Conventions for information on entering Creator IDs, Table Names, and Relationship Names of up to 128 characters.
Relationship Name
The unqualified name of the relationship. Specify 1 to 128 characters. For Option 2, specify the Relationship Type and use DB2 LIKE syntax or leave Relationship Name blank to obtain a selection list.
Relationship Type
Indicate the type of relationship to include in the selection list. This prompt has no effect for Option 1 if you indicate an explicit Creator ID, Table Name, and Relationship Name. Specify:

P or O Include relationships defined to the Optim Directory.

D Include relationships defined to the DB2 Catalog.

I Include IMS™ relationships (Move or Compare for IMS, VSAM, and Sequential Files only).

A Include all types of relationships.

Use '_' for DB2 LIKE character
Indicate whether the underscore “_” is used as a DB2 LIKE character or literally as part of the name. The default is NO, which means “_” is not handled as a DB2 LIKE character.
Note: When the ’_’ character is used in conjunction with the ’%’ DB2 LIKE character, the ’_’ is treated as a ’DB2 like’ character, and not as a literal.

For example, depending on the use of the underscore character, “A_B” can be a three-character name containing the characters “A_B”, as entered, or a three-character name that begins with “A” and ends with “B” with any valid character in the middle.