Previous Topic: Defining Dataviews with DatadictionaryNext Topic: Creating Dataviews for Sequential Files


Recatalog and Recompile

CA Ideal captures all information about a dataview, including field attributes, when the dataview is cataloged. This information is incorporated into the program when the program is compiled and actually becomes part of the program object module.

If you change the table structure that affects the dataview (for example, a change in the element length) or make a change that affects the attributes of any field in the dataview (such as class, type, length, decimal positions, occurs, value, or the relative position of the field in any element) or key structure (adding or deleting fields in key definitions), then you must:

  1. Recatalog the database.
  2. Enable the structure and, if necessary, the dataview.
  3. Catalog the new dataview in CA Ideal.
  4. Recompile all programs using that dataview.

You can perform the CA Ideal CATALOG DATAVIEW without performing the dictionary catalog database, but you cannot run programs against the dataview without performing the dictionary catalog.

You must enable the dictionary structure after performing any function that disables the structure (for example, COPY, ADD, or DEFINE), or an attribute maintenance function that modifies an occurrence.

If you change attributes of a PROD status dataview (for example, UPDATE), the dataview must be restored to TEST status to make the change. When the dataview is copied back to PROD status, a new VERSION is assigned. Follow the recatalog steps 1 to 4 described above, and UPDATE the resources of the programs that access the dataview.

If the table was changed, but not the dataview, the PROD dataview is connected to the new PROD versions of ELEMENTS. Follow steps 1 to 4 only if the updates affected the FIELD, ELEMENTs, or KEYs of the dataview.

When a dataview is copied in DDOL, both the old and new versions of the dataview are immediately reflected in the resource table of every program using the old version of the dataview. This is because the CA Ideal program resource table is a dynamic presentation of all the recognized relationships for a program at the time of the display (or edit).

When you COPY an entity‑occurrence in DDOL, all of its relationships (except ordered relationships) are automatically copied too. Thus, since the dataview is related to every program for which it is a resource by the PGM‑DVW‑USE relationship, copying the dataview also copies each of these relationships. As a result, both the new PROD version and the previous version are related to every program. The resource table of a TEST status program shows both PROD and HIST status dataviews. You must manually remove the HIST status dataview. (This is not a problem with a program in PROD status.)