Product Documentation

FairCom RTG COBOL User Guide

Previous Topic

Next Topic

<schema> table element

The schema describes a schema belonging to the data file; more schemas can be defined if the table contains more than one record schema. If multiple schemas are defined, a <filters> declaration is required.

Elements

Element

Description

<field>

Describes one of the fields comprising the current schema.

Mandatory Attributes

Attribute

Description

name

The name to assign to the current schema. This name will map a SQL table containing all the records selected by this schema.

Optional Attributes

Attribute

Description

delimiterpos

(In V5.1 onwards) Specifies the fixed string delimiter position. Accepted values:

"bufferend" (default) - delimiter will be placed at the end of the buffer if the buffer has enough space.

"stringend" - delimiter will be placed at the end of the string, if the buffer has enough space and padding.

filter

Specifies which filter to use to generate the current schema, use one of the filter numbers defined in the <filters> element

size

The record length for the current schema specified in number of bytes.

stringdelimiter:

(In V5.1 onwards) Specifies the character that will be used as the fixed string delimiter.

Default: Space (0x32)

Accepted values: Same as stringpadding.

stringpadding

(In V5.1 onwards) Specifies the character that will be used as a prefix for fixed string padding.

Default: Space (0x32)

Accepted values:

The following "COBOL Figurative Constant Values" are all accepted:

"LOW-VALUE"

"LOW-VALUES"

"HIGH-VALUE"

"HIGH-VALUES"

"SPACE"

"SPACES"

"ALL-SPACES"

 

Other accepted values:

 

"Base64 string" - '\6' will be used.

 

"Hexadecimal elements" - '\x' will be used.

 

"Hexadecimal string" - '\h' will be used.

Any other character value (e.g. " ") results in no padding, meaning no prefix is applied.

onConvertError

Specifies the default action to take when a value cannot be converted into SQL readable data.

If "error" is specified an error will be returned and the selected table records will not be shown unless the field content matches the bindefault or cbdefault (see <field> schema element) in which case the value will be replaced with a SQL null value.

If "null" is specified, the values that cannot be converted will be replaced with SQL null values.

If "strict" is specified, an error will be returned and the selected table records will not be shown.

TOCIndex