COL structure

Table F-7 shows the contents of the COL structure. The first five full words are reserved for use by the Replication Extract.

Table F-7: COL structure contents

Attribute

Length (Bytes)

Contents

@COL

20

Reserved.

@COL_LENGTH

2

The length of the column as defined in the table in binary.

@COL_COLNO

2

The column sequence within the table in binary. The first column number must be 1.

@COL_SCALE

2

The number of decimal places in a numeric field containing a decimal in binary.

@COL_KEYSEQ

2

The sequence of this column in the table key represented in binary. The value is null (X'00') if it is not part of the key (reserved).

@COL_NAME_LENGTH

4

The binary length of the column name.

@COL_NAME

18

The name of the column, which is not null-terminated.

@COL_TYPE

1

The type of the column. Valid values are:

  • COL_TYPE_CHAR: Character data.

  • COL_TYPE_VARCHAR: Character data.

  • COL_TYPE_DATE: This date is in the YYYY-MM-DD format (where YYYY is the year, MM is the month, and DD is the day of the month).

  • COL_TYPE_DECIMAL: Packed decimal field.

  • COL_TYPE_DONOT_REPL: The name of the column that you do not want to replicate. This value does not appear in the LTL.

  • COL_TYPE_FLOAT: 4-byte or 8-byte float.

  • COL_TYPE_GRAPHIC: Treated as binary (non-quoted).

  • COL_TYPE_INTEGER: Signed binary full word.

  • COL_TYPE_SMALLINT: Signed Binary half-word.

  • COL_TYPE_TIME: This time is in the HH.MM.SS.TTTTTT format (where HH are the hours, MM are the minutes, and SS are the seconds).

  • COL_TYPE_TIMESTMP: This timestamp is in the YYYY-MM-DD-HH.MM.SS.xxxxxx format (where YYYY is the year, MM is the month, and DD is the day of the month, HH are the hours, MM are the minutes, SS are the seconds, and xxxxxx are fractions of seconds).

  • COL_TYPE_VARG: Treated as binary (non-quoted).

  • COL_TYPE_DISTINCT: User-defined datatype.

  • COL_TYPE_TINYINT: 1-byte integer (unsigned).

  • COL_TYPE_DATETIME: The time is in the MM-DD-YYYY HH:MM:SS:TTT format. This encompasses the full range of Sybase datetime values. See documentation for Adaptive Server Enterprise for further details.

  • COL_TYPE_SMALLDATETIME: The time is in the MM-DD-YYYY HH:MM:SS:TTT format. This encompasses a restricted range of Sybase datetime values. See documentation for Adaptive Server Enterprise for further details.

  • COL_TYPE_BINARY: Variable-length binary field.

@COL_FLAG

1

Valid values for column flags are:

  • @COL_DEFAULT: x'0000 0010', NOT NULL WITH DEFAULT.

  • @COL_GRAPHIC: x'0100 0000', the column contains graphic data.

  • @COL_NULLS: x'1000 0000', the column can contain nulls.

  • @COL_VAR: x'0000 0001', the column length is variable.

@COL_MIXED

Indicates column contains mixed data.

@COL_SINGLE

Indicates column contains single-byte data.

@COL_FORBIT

Indicates column contains binary data.