Create DB2 table relations

5 pts.
Tags:
IBM DB2
There is a requirement to have a subset of data available in DB2 tables in production to a test environment. There is no relationship defined in DB2 (so info available in catalog relationship tables). Now we need to find the relationship between the tables using some automation process. So we might not able to manually see each and every program to check how the tables are related. Any suggestions/ideas would be greatly appreciated. Thanks.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Without RI or a really good data dictionary you are essentially out of luck for doing this completely automatically. You’ll need to get somebody to at least define the relationship to you — there are ways to deduce relationships based on table names / column names etc. but you can’t be guaranteed that your interpretation is 100% accurate. Once you’ve mapped out the relationships of the tables then generally the easiest way to solve the problem is to write a quicky program that moves the data for you. Depending on how nice you are, you can make the program smart enough to recognize general keys and then move it all together based on simple user input to the JCL (or ISPF panel, etc). Don’t forget the option to allow the requester to either REPLACE or RESUME (append) the test table data.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • AshishSingh10
    Hi, 

    The below mentioned can be used to create relations: -

    OPTION ===> 1                                                 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 ===> ITEMS                                                 >>  
    
    Specify Relationship Name (OPTIONS 1 and 2) 
      Relationship Name ===> RIB                                               >> 
    
    Specify Relationship Type (OPTIONS 2 and 3) 
      Relationship Type ===> OPT                  (P|O-OPT, D-DB2, I-IMS, A-All) 
    
    Use '_' for DB2 LIKE character ===> NO        (Y-Yes  N-No) 
    Thanks and regards
    Ashish@S

    875 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following