Column Validation File (.val)

The .val database schema file holds functional and display attributes of database table columns.

Description

The .val file holds default attributes and validation rules for database columns.

In form files, the attributes are taken from the .val file as defaults if the corresponding attribute is not explicitly specified in the field definition of the ATTRIBUTES section.

In programs, you can validate variable values in accordance with the INCLUDE attribute by using the VALIDATE instruction.

The .val file can be generated by fgldbsch from the IBM® Informix® specific syscolval table, or can be edited by an external column attributes editor.

This table describes the structure of the .val file:

Table 1. Structure of the .val file
Pos Type Description
1
STRING Database table name.
2
STRING Column name.
3
STRING Column property name.
4
STRING Column property value.

The supported attribute definitions are:

Table 2. Supported attribute definitions of the .val file
Attribute Name Description
ACTION

Defines the ACTION attribute.

Value must be an identifier.

AUTONEXT

Defines the AUTONEXT attribute.

When this attribute is defined, value is YES.

AUTOSCALE

Defines the AUTOSCALE attribute.

When this attribute is defined, value is YES.

CENTURY

Defines the CENTURY attribute.

The value must be one of: R, C, F, or P.

COLOR

Defines the COLOR attribute.

The value is a color identifier (RED, GREEN, BLUE, ...)

COMMENTS

Defines the COMMENTS attribute.

The value is a quoted string or Localized String (%"xxx").

DEFAULT

Defines the DEFAULT attribute.

Number, quoted string or identifier (TODAY).

FORMAT

Defines the FORMAT attribute.

The value is a quoted string.

HEIGHT

Defines the HEIGHT attribute.

The value is an integer followed by: { CHARACTERS, COLUMNS,LINES, POINTS, or PIXELS }

IMAGE

Defines the IMAGE attribute.

The value is a quoted string.

INCLUDE

Defines an include list as the INCLUDE attribute.

Value must be a list: (value [,...]), where value can be a number, quoted string or identifier (TODAY).

INITIALIZER

Defines the INITIALIZER attribute.

Value must be an identifier.

INVISIBLE

Defines the INVISIBLE attribute.

When this attribute is defined, value is YES.

ITEMS

Defines the VALUEUNCHECKED attribute.

The value must be a list: (item [,...]), where item can be a number, a quoted string or (value,"label").

ITEMTYPE

Defines the Form Item Type to be used when the column is used as FIELD in forms.

Value must be an identifier defining the item type (case sensitive!):

Edit, ButtonEdit, Label, Image, DateEdit, TextEdit, ComboBox, RadioGroup, CheckBox, Slider, SpinEdit, TimeEdit, ProgressBar

JUSTIFY

Defines the JUSTIFY attribute.

The value must be one of: LEFT, CENTER or RIGHT.

ORIENTATION

Defines the ORIENTATION attribute.

The value must be one of: VERTICAL or HORIZONTAL.

PICTURE

Defines the PICTURE attribute.

The value is a quoted string.

SAMPLE

Defines the SAMPLE attribute.

The value is a quoted string.

SCROLL

Defines the SCROLL attribute.

When this attribute is defined, value is YES.

SCROLLBARS

Defines the SCROLLBARS attribute.

The value must be one of: X, Y or BOTH.

SHIFT

Corresponds to the UPSHIFT and DOWNSHIFT attributes.

Values can be UP or DOWN.

SIZEPOLICY

Defines the SIZEPOLICY attribute.

The value must be one of: INITIAL, DYNAMIC or FIXED.

STEP

Defines the STEP attribute.

The value must be an integer.

STRECH

Defines the STRETCH attribute.

The value must be one of: X, Y or BOTH.

STYLE

Defines the STYLE attribute.

The value is a quoted string.

TAG

Defines the TAG attribute.

The value is a quoted string.

TEXT

Defines the TEXT attribute.

The value is a quoted string or Localized String (%"xxx").

TITLE

Defines the TITLE attribute.

The value is a quoted string or Localized String (%"xxx").

VALUEMIN

Defines the VALUEMIN attribute.

The value must be an integer.

VALUEMAX

Defines the VALUEMAX attribute.

The value must be an integer.

VALUECHECKED

Defines the VALUECHECKED attribute.

The value must be an number or a quoted string.

VALUEUNCHECKED

Defines the VALUEUNCHECKED attribute.

The value must be an number or a quoted string.

VERIFY

Defines the VERIFY attribute.

When this attribute is defined, value is YES.

WANTTABS

Defines the WANTTABS attribute.

When this attribute is defined, value is YES.

WANTNORETURNS

Defines the WANTNORETURNS attribute.

When this attribute is defined, value is YES.

WIDTH

Defines the WIDTH attribute.

The value is an integer followed by: { CHARACTERS, COLUMNS,LINES, POINTS, or PIXELS }

customer^customer_name^STYLE^"important"^
customer^customer_name^SHIFT^UP^
customer^customer_name^COMMENTS^"Name of the customer"^
order^order_date^DEFAULT^TODAY^
order^order_date^COMMENTS^"Creation date of the order"^