Question about defining virtual fields

book

Article ID: 132019

calendar_today

Updated On:

Products

CA 2E

Issue/Introduction

Defining Virtual fields

When in the EDIT ACCPTH RELATION VIRTUAL FIELDS screen, there aren't any fields.
The relation is an Owned by.
When trying to add the Virtual field to the Owned by file, is it required to define the virtual field on the parent file first?
If the parent file is heavily used, would it be best to define a new access path on the parent and then add the field to be "virtualized" to just that access path? 

Environment

IBM Iseries

Resolution

Question-1: - Is it required to define the virtual field on the parent file first?
A) Specifying virtual fields is a two-level process: For a field to be used as a virtual field, it must be specified as a virtual field on both the file relations of the parent file and the access path relations of parent file. (Unless selecting the virtual fields at the access path level, virtual fields won't be included for that access path, even though virtual fields are selected at the file level.
If fields are not specified as virtual at file relations level of parent file, no virtual fields will be available at the access path level).

Question-2: - If the parent file is heavily used, would it be best to define a new access path on the parent and then add the field to be "virtualized" to just that access path?
A) Yes create a new access path and virtualize the fields to just that particular access path.