[
|../../index.htm#lansa/l4wtgu01_0220.htm]
You are here:
If you want to define a new field into the LANSA dictionary use this decision tree:
All other types are provided for compatibility with non-LANSA database tables. Generally you should avoid using them when defining new fields or columns in new DBMS tables.
Commonly Used Field Types
Type |
Description |
Typical DBMS Storage Type |
Maximum Dictionary Definable Length |
Subject to Code Page Conversions |
Notes |
Useable in RDML or RDMLX Programs |
||
|---|---|---|---|---|---|---|---|---|
Integer |
Integer |
INTEGER |
4 bytes. |
|
Hardware and compiler behaviors may vary. |
RDMLX |
||
Packed |
Standard decimal number |
DECIMAL |
RDMLX programs: 63 digits of which up to 63 may be decimals |
N/A |
|
Both |
||
String |
Variable length alphanumeric string with a dictionary defined maximum length. |
VARCHAR (variable length) |
65535 |
YES |
Not padded with blanks to the dictionary defined maximum length, except that a zero length string has 1 space added. |
RDMLX |
||
VarBinary |
Exactly the same as String but never subjected to code page conversions. |
VARBINARY |
32767 |
NO |
Not padded to the dictionary defined maximum length. |
RDMLX |
||
NVarChar |
Similar to String but data is handled as Unicode. This allows multiple languages to be used at execution time. |
NVARCHAR |
65535 characters |
YES (but only when converted to native String) |
|
RDMLX |
||
Alpha |
Constant length alphanumeric string with a dictionary defined maximum length. |
CHAR (fixed length) |
256 |
YES |
Always padded with blanks to the dictionary defined maximum length. |
Both |
||
Date |
Date in ISO format: YYYY-MM-DD |
DATE |
N/A |
N/A |
|
RDMLX |
||
Time |
Time is ISO format HH:MM:SS |
TIME |
N/A |
N/A |
|
RDMLX |
||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="70a85958-e80d-40c2-be09-6be8111c0cfd"><ac:plain-text-body><![CDATA[ |
DateTime |
Date and Time in ISO format YYYY-MM-DD HH:MM:SS[.fffffffff] where the existence and length of the [.fffffffff] portion are definable. |
DATETIME |
29 |
N/A |
|
RDMLX |
]]></ac:plain-text-body></ac:structured-macro> |
Boolean |
True/False |
Decimal |
N/A |
N/A |
|
RDMLX |
|
Specialized Character and Binary Types (useable only in RDMLX programs)
Type |
Description |
Typically Stored in a DBMS as |
Maximum Dictionary Definable Length |
Typical DBMS Storage length used |
Subject to Code Page Conversions |
Important |
|---|---|---|---|---|---|---|
Char |
Exactly the same as String, except fixed length and DBMS storage implementation is usually CHAR. |
CHAR |
65535 |
Fixed length |
YES |
|
Binary |
Exactly the same as VarBinary but DBMS implementation varies. |
BINARY |
32767 |
May be either Fixed or Variable. |
NO |
Databases that use fixed length column types will pad to the maximum length. |
NChar |
Exactly the same as NVarChar, except fixed length and DBMS storage implementation is usually NCHAR |
NCHAR |
65535 |
Fixed length |
YES (but only when converted to native String) |
|
CLOB |
Character Large |
CLOB |
Undefined |
Varies according to content |
YES |
DBMS performance considerations may apply. |
BLOB |
Binary |
BLOB |
Undefined |
Varies according to content |
NO |
DBMS performance considerations may apply. |
|
Rarely Used Numeric Types
Type |
Description |
Typical DBMS storage Type |
Maximum Dictionary Definable Length |
When to Use |
Important |
Useable in RDML or RDMLX Programs |
|---|---|---|---|---|---|---|
Signed |
Signed or Zoned decimal |
DECIMAL |
RDMLX programs: 63 digits of which up to 63 may be decimals |
For programmatic numeric/character overlaying operations. |
Signed is less efficient than Packed or Integer on mathematical operations. |
Both |
Float |
Floating Point |
FLOAT |
Undefined. |
When using non-LANSA defined DBMS tables only. |
Hardware and compiler behaviors may vary. |
RDMLX |
|
[
|../../index.htm#lansa/l4wtgu01_0220.htm]