Building Column/Field Relationships
File-AID for Db2 enables you to modify the relationship file by modifying existing application relationships or creating new ones. To modify or create application relationships, you modify or create column/field relationships on the Relationships screen. An application relationship can consist of one or more column/field mappings.
The parent and dependent portions of the Relationships screen comprise two lists. These lists contain names, data types, and lengths of columns or fields from the parent and dependent objects specified in the preceding screen. Use these lists to build the relationships at the column/field level.
To build column/field relationships:
- Decide which parent and dependent columns or fields you want to be related. It is likely that these will be columns or fields that your application recognizes as containing data values that are used as an index into the corresponding object in the relationship.
Enter the number from the dependent NMBR column that corresponds to the dependent column/field you chose in step 1 in the parent CMD column next to the name of the parent column/field you chose in step 1. See the following figure.
Refer to Column/Field Types Mapping to see which data types can be paired to establish an application relation. For other pairings File-AID for Db2 displays an error message and will not establish the relationship.
Relationships Screen — Creating a DB2 to MVS Relationship
Press Enter.
If one or both parent and dependent fields in an MVS file contain subscripts, File-AID for Db2 will need to know which occurrence of subscript to use for the relationship. In that case, File-AID for Db2 continues with Specify MVS Field Subscripts .
When partial column mapping is allowed between the parent and dependent columns/fields, the Extended Column Relationship Definition pop-up window is displayed as shown in the following figure. See Extended-Column-Relationship-Definition for more information about extended column relationships.
Extended Column Relationship Definition Window
If partial column mapping is not applicable for the selected parent to dependent pairing the relationship is established immediately. File-AID for Db2 positions the name of the parent column/field of the relationship you just created to the end of the list of established column relationships as shown in Relationships Screen — New DB2 Column to MVS Field Relationship Established. Note that the new column relationship is located above the dashed “End of Related Columns” line. In addition, the Mapped Fields value is filled with the dependent column/field number that appeared in the NMBR column next to the dependent column/field as well as any applicable extended column information in parentheses, followed by the dependent column/field name.
Relationships Screen — New Db2 Column to MVS Field Relationship Established
- Repeat steps 1-3 for all columns/fields that you want to include in the application relationship for the pair of objects.
When you exit from this screen, File-AID for Db2 writes a new or modified application relationship to the relationship file. File-AID for Db2 redisplays the Application Relationship Detail screen, where the completed action is indicated in the Status column with the “Added” or “Modified” message.
Related topics