Previous Topic: Dataview MenuNext Topic: For SQL Access


Cataloging a Dataview

A dataview must be cataloged with the CATALOG DATAVIEW command before CA Ideal can access it. When it is cataloged, CA Ideal captures all information about the dataview, including all column information. This information is incorporated into each program that uses the dataview as a resource when the program is compiled, and actually becomes part of the program object module.

If any change is made to the file structure that affects the dataview (for example, a change in the element length) or if a change is made that affects the attributes of any column in the dataview (such as class, type, length, decimal positions, or the relative position of the column in any element), then you must recatalog the dataview and recompile all programs using that dataview in CA Ideal.

To catalog a dataview, use the CATALOG command or select option 2 (CATALOG) from the Dataview Menu. The syntax of the CATALOG command is shown below.

Note: Access the CATALOG DATAVIEW prompter by selecting option 3 on the CA Ideal Administration Maintenance Menu.

This command has the following format:

        {*                              }
CATALOG {[dbms] DATAVIEW dvwidentifier }
        {                               }
             [[WITH] {VALIDATION   } ] 
             [       {NOVALIDATION } ]
             [       {             } ]

* An asterisk represents the current dataview and can be substituted for the DATAVIEW phrase.

dbms (Mixed SQL site only)

The database management system that SQL statements using this dataview access. This option overrides the DBMS specified by a SET ENVIRONMENT SQL command.

Valid values are:

DB-The dataview accesses an CA Datacom SQL object.

DB2-The dataview accesses a DB2 object.

Note: You can use this option only for cataloging a new dataview, not for recataloging an existing dataview. To change the DBMS for a dataview that was already cataloged, you must delete the dataview and catalog again.

dvw‑identifier

Identifies the dataview. The dvw‑identifier includes different parts, depending on the type of dataview to identify:

For SQL dataviews-Specify the dvw‑identifier as:

authid.dvw‑name

authid-The one‑ to eight‑character authorization ID required for SQL dataviews only.

dvwname-The 1‑ to 18‑character name of the dataview. For SQL dataviews, the dataview name is the name of an SQL object (table, view, or synonym).

For CA Datacom/DB native access, sequential, and VSAM dataviews-Specify the dvwidentifier as:

dvwname [VERSION ver]

dvwname-The 1‑ to 18‑character name of the dataview.

VERSION ver-The version of the dataview. The specified version must be in test or production status. If you specify dvwname and omit the version clause, the default version specified in the SET VERSION command is used. Valid versions are:

Tnnn-The version number of a test dataview modeled in the dictionary (CA Datacom/DB native command access and modeled sequential files only).

T-Represents test status.

nnn-The one‑ to three‑digit version number assigned to a production dataview or an unmodeled dataview in test or production status.

PROD-The production status version of the dataview.

Note: You cannot catalog a version in history status.

[WITH] VALIDATION (VSAM only)

Specify this option to verify CA Ideal dataview attributes against the actual characteristics of the VSAM file in the VSAM Access Control Blocks. For more information about validating VSAM dataviews, see section, Runtime Considerations for VSAM Dataviews, in the chapter Creating Dataviews for VSAM Files. If any discrepancies are found, the CATALOG command fails and error messages are issued. You can abbreviate this option as VAL.

Important! Use this option only if the file is accessible in the current environment.

[WITH] NOVALIDATION (VSAM only)

Specify this option to catalog the dataview without validating the attributes. You can specify this option as NOVAL. Use this option if the file is not accessible in the current environment.

WITH NOVALIDATION is the default, but you can change the default by specifying the command SET CATALOG VALIDATION.

When the CATALOG DATAVIEW command is processed, a DISPLAY DATAVIEW command is automatically invoked.