UPDATE Option

During the life of a database, the demands upon it can occasionally change. The UPDATE option allows an existing database description to be modified accordingly. When used with the REORGANIZATION feature, extensive changes can be made to the database.

When the UPDATE option is performed, the entire database must be redescribed. The DASDL compiler creates the new description file and then compares it with the old description file to ensure all changes are valid. The DASDL compiler uses the old description file, titled DESCRIPTION/<database name>, as input. When a database name is specified in the UPDATE option, this name is used to form the description file title. Otherwise, the DASDL compiler assumes the old and new description file titles are the same, and uses the database name specified when the new database description is compiled.

When a database is compiled with the UPDATE option, the DASDL compiler does not recalculate AREAS, AREASIZE, BLOCKSIZE, or POPULATION for the new description file. The DASDL compiler copies these attributes from the previous description file in the updated description file unless new values are explicitly specified. If values are specified in the update, the new values are used.

If a DASDL UPDATE compilation increases the database update level, the old description file is backed up using a WFL job generated by DASDL, and is located under the same usercode and on the same pack as the new description file. This old description file is backed up as

DESCRIPTION/<database name>/<old update level> 

The old update level designation is the update level of the old description file.

Examples of when the update level increases include

  • Changing file or record formats

  • Adding or deleting structures

  • Updating to the next major ClearPath MCP release

If DASDL cannot back up the old description file for any reason (such as WFL syntax errors, a discontinued COPY job, a missing file, or a missing pack), DASDL returns an error. The old description file is not backed up if the update level is not increased, or if the DASDL UPDATE compilation checks for syntactical correctness only or has errors.

If you compile DASDL without using the UPDATE option and an initialize statement, DASDL responds as if you were compiling a new database and creates the following files:

  • A new description file

  • A new control file (if the DMCONTROL compiler control option is set)

  • New tailored software, for example, the DMSUPPORT library (if the ZIP compiler control option is set)

The database files are untouched. For more information about the initialize statement, refer to Initialize Statement in Using the Initialize Statement and the Options and Parameters Specifications.

The DASDL UPDATE compilation now accepts changes made to any structure. A REORGANIZE clause is no longer required in front of each reorganized structure. The DASDL compiler determines the changes that have been made to the reorganized structure. Though the REORGANIZE clause is no longer necessary, the old syntax is still valid. If used, however, a warning message is issued to indicate that the REORGANIZE clause is not needed. In addition, if a REORGANIZE clause appears in front of a structure, the structure is treated as a reorganized structure even if no changes were made.

The following diagram illustrates the syntax for using the UPDATE option:

<UPDATE option>

── UPDATE ─┬─────────────────┬─────────────────────────────────────────►
           └─<database name>─┘

►─┬────────────────────────────────────────────────────────────────┬───┤
  └─ ; ── REORGANIZE GLOBAL DATA ─┬────────────────────────────────┤
                                  └─ ( ── ITEMS ─┬─ SAME ────┬─ ) ─┘
                                                 └─ CHANGED ─┘