Fields
The fields on a DataCom table can be edited as follows:
- Select the "Fields" node in the left-hand pane:

- Ensure that the DataCom table is locked by selecting the lock button in the toolbar.
- To insert a field: right-click in the right-hand pane and select "Insert".
- To delete a field: right-click on the field name and choose "Delete".
- Field properties are set via the object inspector. You can also set it via the bulk mode screen by right-clicking in the right-hand pane and choosing the option "Bulk Mode". The bulk mode screen lets you view and edit the fields in a free-format text window. See Bulk Mode for more information.
The following properties are set on the Fields screen:
Properties |
Description |
Available Values | ||||||||||||
Name |
Name of the field. | <Text> | ||||||||||||
Type |
Field type.
To insert fields inside a structure, create a Structure field and then select the END_STRUCTURE
field. Inserting fields will then add the fields inside the structure. |
<Alpha | Financial | Financial Binary |
Financial Comp | Int32 | Integer | Numeric | Numeric Binary | Numeric Comp | Signed | Structure> |
||||||||||||
Length |
The maximum number of characters for the field, including any decimal positions. Not applicable for Int32 or Integer. |
<Integer> | ||||||||||||
Decimals |
Number of decimals for the field, which is included in the Length. | <Integer> | ||||||||||||
Array |
Array dimensions. Up to 6 dimensions can be specified, separated by commas. Arrays are not allowed on floating point types. |
<[Integer], [Integer], ..]> | ||||||||||||
Comment
|
Description of the field. | <Text> | ||||||||||||
DataComDbEdits |
Enables DataCom processing for data editing and default processing. | True | False | ||||||||||||
DbFieldType | The database field type which is used in the application database. Possible types depend on both the chosen AMT field type, length, decimals, dictionary and the database type specified in the generation set. See the Database field types page for information on the usage and behaviour of this setting. Please note that the developer is responsible for ensuring that the chosen AMT field fits in the chosen DbFieldType when selecting a DbFieldType different from the default type. |
<Database specific field type> See 'Database field types' for all possible options. |
||||||||||||
NULL values |
If set to True, it is possible to store NULL values in the field. If set to False, it is not possible to store NULL values in the field. Fields that belong to a table index are always set to False. During the reorganization of the runtime database, AMT-COBOL makes sure that the database settings in this database are always according to the NULL Values property. Please note that if a new field is added to a table containing data(rows) that does not allow NULL values, an initial value should also be set (see above), otherwise the reorganization process will fail. Alternatively it is possible to set the new field to allow NULL values initially and after a reorganization, to modify the field to disallow NULL values to be stored. |
True | False | ||||||||||||
ReadOnly |
Set to True if the field value should be read only. | True | False | ||||||||||||
Redefines |
Name of the redefine field. | <Text> | ||||||||||||
SqlName |
Optional property in which the name of the DataCom field as used in the AMT user database can be set. If left empty, the name as set in the "Name" property (see above) will be used. |
<Text> |