Previous Topic: Runtime Considerations for VSAM DataviewsNext Topic: Updating: Use of the Primary Index


Validating the Dataview at Runtime

The first time a VSAM dataview is accessed during the execution of a program, the dataview is validated for the following attributes:

The source against which the attributes of a VSAM file are validated depends on the runtime environment. In CICS, the FCT entry for the base cluster and alternate path are used. The FCT entry for variable‑occurrence or variable‑segment files must indicate that the file has records of varying lengths. In all other environments, the information is obtained by opening the relevant data sets.

The extent of validation depends on the update attribute of the dataview. If the dataview is updateable in the current program, the whole upgrade set defined for the dataview is validated (for KSDS data sets). If the dataview can only be read (as defined in the program, in the dataview definition, or at runtime), only the current access path is validated. Index uniqueness and membership in the upgrade set are not validated.

If validation fails, a runtime error results.