Previous Topic: INCLUDENILKEYNext Topic: Recatalog and Recompile


Defining Dataviews with Datadictionary

This section summarizes the creation of dataviews using Datadictionary Online (DDOL). The Datadictionary Batch Utility DDUPDATE provides a mechanism for creating and maintaining dataviews and their related file model structures in batch.

A complete description of the information summarized here is provided in the appropriate Datadictionary documentation.

  1. SET MODE DBMAINT or select option 1 on the mode menu.
  2. Create the database in STAT Tnnn. You are prompted for the name of the areas and required attributes. When you enter and apply this information, DDOL displays the structure so far, consisting of just the database and areas.
  3. Modify each AREA (for example, use MOD line commands and PF4). This prompts for the next level (table) attributes and gives an opportunity to modify those of the area. Entering the APPLY command shows the area structure so far, with a file and a table. If there are multiple areas, use PF4 to bring up the next area.
  4. Modify the table and declare the keys and elements. DDOL provides only one line, but you can insert extra lines as needed. For each key, enter the attributes marked Key Only. Enter the APPLY command to see the file structure so far.
  5. DEFINE the fields for the table, keys, and elements (using DEF line commands and PF4). DDOL processes the record definition. When the record definition is successfully applied, use PF4 to move on to the keys and type in the field name. Enter the APPLY command, and then press PF4 to move on to the element, where the Include is changed to “Y” for each field to include. Apply the elements.
  6. Create the dataview (accessing elements). You do not need to define the keys here; CA Ideal finds the keys from the previously defined structure. Fill in the table name, the table's version, the elements, and whether the dataview is used for updating data. Enter the APPLY command.
  7. If required, copy the database structure to status Prod. This verifies that the definition is consistent before the change is made.
  8. Copy the dataviews to Prod if the database is now in PROD.
  9. Catalog the database definition. This updates the CXX file.
  10. Enable the database structure (TEST version or PROD).
  11. Create and initialize the Index and Data areas.
  12. In CA Ideal, use the CATALOG DATAVIEW command to catalog a dataview. A dataview must be cataloged before CA Ideal uses it. You can issue one or many CATALOG commands in a batch run of CA Ideal.

    When the CATALOG DATAVIEW command is processed, a DISPLAY DATAVIEW command is automatically invoked. If one or more rules are violated, a list of error messages displays at the bottom of the dataview display (or, if the CATALOG command is issued using CA Ideal in batch, a listing is printed).

    CATALOG DATAVIEW results in a cataloged dataview definition ready for CA Ideal use. Any CA Ideal program naming the dataview as a resource that compiles successfully can be executed.

    Access the CATALOG prompter by selecting option 4 on the CA Ideal Administration Maintenance Menu. For syntax and description of the command, see the Command Reference Guide.