Product Documentation

c-treeRTG COBOL Edition User's Guide

Previous Topic

Next Topic

Type Mapping Table

To define an XDD file requires defining the data type of each column of the original data file. The following table describes the accepted XDD data types:

Type to be used in the XDD field specification

Type description

NumUnsigned

ASCII string representing an unsigned number

NumSignSep

ASCII string representing a signed number with trailing separate sign.

NumSigned

ASCII string representing a signed number with trailing sign

NumSepLead

ASCII string representing a signed number with leading separate sign

NumLeading

ASCII string representing a signed number with leading sign

Alphanum

ASCII string

Float

Float or Double values

CompSigned

Signed computational

CompUnsigned

Unsigned computational

PackedPositive

Packed string representing a positive number

PackedSigned

Packed string representing a signed number

PackedUnsigned

Packed string representing an Unsigned number

BinarySigned

Integer number represented in binary signed format (big endian)

BinaryUnsigned

Integer number represented in binary unsigned format (big endian)

NativeSigned

Integer number represented in native O/S binary signed format

NativeUnsigned

Integer number represented in native O/S binary unsigned format

See also <schema> table element.

In This Section

Variable-length fields mapped into LONGVAR* SQL field

Previous Topic

Next Topic

Variable-length fields mapped into LONGVAR* SQL field

Variable length fields map into SQL LONGVAR* fields.

The XDD structure allows the following elements and attributes for variable length field support.

  1. dbtype values:
    • BLOB: Indicates a variable-length binary object with length depending on a field value.
    • CLOB: Indicates a variable-length text object with length depending on a field value.
  2. <field> attribute sizefield used in conjunction with dbtype BLOB or CLOB and having size = "0"

For an XDD field mapped into a LONG VARCHAR or LONG VARBINARY, the following conditions must be met:

  1. The field definition must have:

    size="0"

    sizefield="X" where "X" is a valid field containing the number of bytes (we suggest this field to be hidden, but this is not mandatory)

    dbtype="clob" or dbtype="blob"

  2. At maximum, one and only one field mapped to a BLOB or CLOB type.
  3. It must be the last field in the record buffer.

If one (or more) of the above condition is not met, error CTDBRET_CALLBACK_11 ("Unsupported clob/blob definition") is returned.

TOCIndex