4GL_ILLEGAL_DATA

4GL_ILLEGAL_DATA determines how COBOL data considered illegal by the database is converted before being stored in the database.

The default value is NULL. This causes all illegal data (except key fields) to be converted to null before it is stored.

The value CONVERTED causes the following conversions to occur:

Illegal LOW-VALUES Minimum possible value (0 or 99999...)

Minimum possible date value (01/01/01)

Illegal HIGH-VALUES Maximum possible value (99999...)

Maximum possible date value (database dependent)

Illegal SPACES Zero (or 01/01/01 for a date field)

Illegal data in key fields is always converted, regardless of the value of this variable.

Oracle Special Options

The following values for 4GL_ILLEGAL_DATA apply only to Oracle character fields:

KEY_MOD

If a key field contains LOW-VALUES in the first byte, the field is considered invalid. The default behavior is to set the field to the minimum possible value. For character fields, this would result in a single character with the hex value of 0x01 being inserted. (For fixed-length fields, Oracle would space pad the field.)

Setting 4GL_ILLEGAL_DATA to KEY_MOD results in only the first byte of an invalid key field being modified to the hex value of 0x01. The remainder of the field remains unchanged.

This value can be useful for users converting from versions prior to 6.2 in which the interface's functionality matched this behavior rather than the documented behavior.

PASS_THROUGH

Setting 4GL_ILLEGAL_DATA to PASS_THROUGH allows all key field and non-key field values to directly pass to Oracle after having trailing spaces removed for variable length fields. Any error detection on the fields is handled by the Oracle database itself.