Displaying Virtual Fields

How to:

Reference:

The? DEFINE command lists the active virtual fields used in a request. The fields can be created by either the DEFINE command or DEFINE attribute in the Master File. The command displays field names of up to 32 characters. If a name exceeds 32 characters, a symbol in the 32nd position indicates a longer field name. In WebFOCUS, this symbol is an ampersand (&).

Syntax: How to Display Virtual Fields

? DEFINE [appname/][filename]

where:

appname

Is the application directory.

filename

Is the data source containing the virtual fields. If filename is omitted, the command displays all virtual fields.

Example: Displaying Virtual Fields

Assume that you created a virtual field named NEW_DATE in a request against the EMPLOYEE database.

Issuing

? DEFINE

produces the following information:

FILE FIELD NAME FORMAT SEGMENT VIEW TYPE EMPLOYEE NEW_DATE YYMD 2

Reference: ? DEFINE Query Information

The following information is listed for each virtual field created with DEFINE:

Option

Description

FILE

Is the name of the data source containing the virtual field.

FIELD NAME

Is the name of the virtual field.

FORMAT

Is the format of the virtual field. The notation is the same as that used for the FORMAT attribute in a Master File.

SEGMENT

Is the number of the segment in the Master File containing the virtual field. During reporting, your application treats the virtual field as a field in this segment. To relate segment numbers to segment names, use ? FDT.

VIEW

Is the root segment of DEFINE that specifies an alternate view. For example:

DEFINE FILE EMPLOYEE.JOBCODE
TYPE

Indicates whether the virtual field is created by the DEFINE attribute in the Master File, or by a DEFINE command, identified by MASTER or a blank, respectively.