Adding a column

When adding a new column to an existing table, you will use the ALTER TABLE statement with the ADD COLUMN clause. By default the column will be added towards the end of the table. You can define the new column to overlap existing columns in the table by specifying the actual starting offset with the START keyword. The physical records are not actually changed until values are inserted in the new columns.

New columns added can be defined to be searched within IMS with an INTERNALNAME. Program views can then be created to have field level sensitivity towards these columns. The program view changes are not necessary if the columns are not searchable within IMS (without the INTERNALNAME).

Procedure

  1. Issue an ALTER DATABASE statement to identify the database in which you plan to modify.
  2. Issue an ALTER TABLE statement. Ensure that you also provide the IN keyword to reference it to the database it belongs to. As part of the ALTER TABLE statement, include an ADD COLUMN clause.
  3. Issue a COMMIT DDL statement.