Wednesday, October 1, 2025

Basic constraints with DDS files

In my previous post I described how I could add several constraints to DDL Tables. Here I am going to describe how I can do the same with DDS physical files.

I will have two sets of parent and child files. The first I will add the constraints using SQL statements. The second I will use the Add Physical File Constraint command, ADDPFCST.

I will be adding the following constraints to the physical files:

  1. Add primary key constraint using SQL
  2. Add primary key constraint using CL command
  3. Foreign key constraint using SQL
  4. Foreign key constraint using CL command