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.

Important:

The form field attribute definition in the .val file is supported for backward compatibility. Do not use this feature in new developments.

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. The attributes in the .val file can be considered as a default configuration for a form field.

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
AUTONEXT

Defines the AUTONEXT 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.

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).

INVISIBLE

Defines the INVISIBLE attribute.

When this attribute is defined, value is YES.

JUSTIFY

Defines the JUSTIFY attribute.

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

PICTURE

Defines the PICTURE attribute.

The value is a quoted string.

SHIFT

Corresponds to the UPSHIFT and DOWNSHIFT attributes.

Values can be UP or DOWN.

VERIFY

Defines the VERIFY attribute.

When this attribute is defined, value is YES.

Example

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"^