Writer instructions | ||
Purpose | Use this page to display a banner announcement on each page of the space. Create the Space announcements page in the master space, outside of the Home branch. You can version the Space announcements page to enable different banners to be published into different target spaces, however, the banner that is displayed in the versioned (master) space itself only displays the most recently-published banner. If you find errors in the banner area of your versioned space and you are sure the Space announcements page is set up correctly, try publishing the page to the same space. For more information, see Space-announcements-banners. | |
Removing | When an announcement is no longer needed, remove the BMC Space Banner macro. | |
Translation | Localized spaces using the L10n Viewport theme must change the name of this page to Space announcements l10n. See Configuring-the-Scroll-ViewPort-theme-for-translated-spaces. | |
Usage | Choose one or none of the following BMC Space Banner macros. If your space requires another kind of announcement, you can use this page in coordination with your team lead and editors. |
Using related table edit
When you issue the REDIT command, File-AID for Db2 searches the Db2 catalog and the relationship file to determine what tables are related to the driving table. Determining-relationships describes this process in detail. The screen or window that File-AID for Db2 then displays is based on what relationships are determined.
This section explains the following possible scenarios:
- A one-to-one or one-to-many table relationship exists. At least one relationship definition exists for the table you are editing. You are prompted with a list of tables from which you select one of the dependent tables. See One-to-One or One-to-Many Table Relationship for more information.
- You select a parent table of the driving table. The parent row of the driving table’s current row and additional rows of the parent table appear. You cannot open any other tables as long as the parent table is open (REDIT/RBROWSE are disallowed). See Selecting a Parent Relationship for more information.
- Model relationships exist. No relationship definitions exist for the table you are editing; however, relationships exist for the same table name with different creators. You can select one of these relationships as a model and use the relationship to initiate a related edit session. When you use a model relationship, the relationship is not saved for your creator ID; it is only temporary. See Creating-a-new-relationship for information on adding a new relationship. See Model Relationship for more information on using a model relationship.
No relationships exist. No relationship definitions exist for the table you are editing. You can dynamically create an application relationship from the edit session with the driving table as the parent. Once created, you can edit the related dependent table. See No Relationships for more information.
If a relationship is found but there are no rows in the dependent table that relate to the selected row in the parent, an insert line displays in the dependent table. The foreign key field is filled with the parent table’s primary key value.
In the next four sections, a sample relationship file that supports each scenario is shown in tabular format.
One-to-One or One-to-Many Table Relationship
A one-to-one relationship exists when there is only one relationship defined for the table you are editing. A one-to-many table relationship is one where multiple relationships exist for the table you are editing. The following table shows a relationship file that supports a one-to-many relationship.
Relationship File — One-to-Many Relationship
Parent Table | Dependent Table | Type | Primary Key | Foreign Key | |
---|---|---|---|---|---|
1 | TSOID01.DEPT | TSOID99.EMP | RI | DEPTNO | WORKDEPT |
2 | TSOID01.EMP | TSOID99.DEPT | RI | EMPNO | MGRNO |
3 | TSOID01.EMP | TSOID01.EMPPROJACT | RI | EMPNO | EMPNO |
4 | TSOID01.EMP | TSOID01.PROJ | RI | EMPNO | RESPEMP |
Enter REDIT Primary Command
When you enter REDIT (Enter REDIT Primary Command), File-AID for Db2 determines what tables are related to TSOID01.EMP (see Determining-relationships.). The sample relationship file in Relationship File — One-to-Many Relationship shows that there are four relationships defined for TSOID01.EMP. The Related Table List window (see the following figure) displays.
Related Table List Window
The Related Table List window displays the relationships in the bottom half of the window. You have the following options:
- Enter the S line command to select a table to edit.
- Enter the I line command to display information about the relationship. See Relationship Information Window.
- Enter the ADD primary command to create a new application relationship. The Column Relationships screen (Add Application Relationships screen Invoked by ADD Command) displays. See Creating-a-new-relationship.
- Enter END to exit the window and cancel the REDIT command.
Related Table List Window shows relationship 4 being selected. The relationship is between TSOID01.EMP and TSOID01.PROJ. Since the EMPNO of the selected row is 000010, File-AID for Db2 displays a window of PROJ table rows where the RESPEMP is also equal to 000010. That is, you can view all the projects for employee number 000010 (see the following figure).
Related Table Edit Display — EMP to PROJ Table
Selecting a Parent Relationship
If you selected a PARENT relationship (see the following figure), you enter a related edit/browse session of the parent.
Related Table List Window
After you select the RI - PARENT relationship for table DEPT and pressed ENTER, the Related Table Edit Display — Dependent to Parent screen displays the parent record for the current dependent record. The following figure shows the Related Table Edit session when you selected parent table.
Related Table Edit Display — Dependent to Parent
Model Relationship
If no relationships exist for the table you are editing, but there are relationships defined for the same table name with a different creator, you can use one of these relationships as a model. Selecting a model enables you to initiate a Related Table Edit session using a relationship defined under a different creator. The following table shows a relationship file that supports this scenario.
Relationship File — Model Relationship
Parent Table | Dependent Table | Type | Primary Key | Foreign Key | |
---|---|---|---|---|---|
5 | PROD.EMP | PROD.PROJ | RI | EMPNO | RESPEMP |
6 | TSOID23.EMP | TSOID23.EMPPROJACT | RI | EMPNO | EMPNO |
7 | TSOID57.EMP | TSOID57.PROJ | RI | EMPNO | RESPEMP |
Related Table Edit Display — DEPT to EMP Tables
When you enter REDIT (Related Table Edit Display — DEPT to EMP Tables), File-AID for Db2 determines what tables are related to TSOID01.EMP. (See Determining-relationships.) The sample Relationship File (Relationship File — Model Relationship) shows that no RI or AR definition exists for TSOID01.EMP. However, there are existing definitions under different creators, PROD 5, TSOID23 6, and TSOID57 7 that can be used as models.
The Relationship Listing window (see the following figure) displays.
Relationship Listing Window
The Relationship Listing window displays the model relationships, PROD.EMP, TSOID23.EMP, and TSOID57.EMP in the bottom half of the window. You have the following options:
- Enter the S line command to select a relationship as a model for your Related Table Edit session.
- Enter the I line command to display information about the relationship. See Relationship Detail Window.
- Enter the ADD primary command to create a new application relationship. The Column Relationships screen (Add Application Relationships screen Invoked by ADD Command) displays. See Creating-a-new-relationship.
- Enter END to exit the window.
Relationship Listing Window shows relationship 5 being selected. After in the Related Table List screen this relationship between PROD.EMP and PROD.PROJ had been selected, a Related Table Edit session is initiated for the PROJ table (see the following figure).
Related Table Edit Display — after Selecting a Model Relationship
No Relationships
If no relationships are defined for the table you are editing, and no relationships exist for the same table name with a different creator, you can dynamically create a new application relationship. The following table shows a relationship file that supports this scenario.
Relationship File — No Relationship
Parent Table | Dependent Table | Type | Primary Key | Foreign Key |
---|---|---|---|---|
PROD.ORDER | PROD.PARTS | AR | ORDERNO | ORDERNO |
When you enter REDIT (REDIT Primary Command), File-AID for Db2 determines what tables are related to TSOID01.DEPT. (See Determining-relationships.) The sample relationship file shown in Relationship File — No Relationship shows that no relationships exist for TSOID01.DEPT and there are no relationships for the same table name with a different creator.
The No Relationships Exist window (see the following figure) is displayed.
No Relationships Exist Window
You have the following options:
- Enter the ADD primary command to create a new application relationship. The Column Relationships screen (Add Application Relationships screen Invoked by ADD Command) displays. See Creating-a-new-relationship.
- Enter END to exit the window.
Related topics