Previous Topic: Dataview Access SecurityNext Topic: Rules for SQL Dataviews


Creating Dataviews for SQL Access

When a CA Ideal application uses SQL to access data, it requires a dataview for the SQL object-table, view, or synonym. The dataview includes all fields defined for the SQL object. It is the only dataview that can be defined for it. The dataview name is the name of the SQL object.

You can use SQL dataviews in embedded SQL DML statements. However, for CA Datacom SQL access, you can use DDL and DCL statements, such as CREATE and GRANT, without defining CA Ideal dataviews, which do not have to be placed in the resource table component of the program.

Using CA Ideal PDL, you can find any row or set of rows by using the FOR statement with the dataview for the table, view, or, for CA Datacom SQL access, synonym. See the Programming Reference Guide.

No CA Ideal components are necessary to create and edit dataview descriptions for SQL objects. For DB2, the definitions of tables and views are maintained in the DB2 catalog, while definitions of dataviews are maintained in the dictionary. For CA Datacom SQL access, the definitions of tables, views, synonyms, and dataviews are maintained in the dictionary.

The catalog process makes a dataview definition available to CA Ideal. When you catalog a SQL dataview, CA Ideal records a dataview corresponding to the SQL object as an entity occurrence in the dictionary. The dataview entity occurrence is always version 1 in production status.

For more information about cataloging a dataview for SQL access, see Cataloging a Dataview in the “Creating Dataviews for CA Datacom/DB Native Command Access” chapter.