Integers are whole numeric fields and are signed by default. Fields of type Integer have a length measured in bytes (1, 2, 4, 8). For example, a signed Integer of Byte Length 2, can store values from -32768 to +32767. Integers have no decimal places and are accurate. Integers are classed as Numbers in LANSA.
The following table provides the implied length for each of the possible byte lengths for an Integer. The implied length is equivalent to the actual length of a signed or packed field.
|
Please review the general 1.1.1 Field Type Considerations.
Field Definition Rules
Rules for defining an Integer in the repository are:
Length |
Integers may be 1, 2, 4, or 8 bytes in length. Integers have no decimals. |
Valid Keyboard Shift |
Blanks |
Allowed Attributes |
AB, ASQN, CS, FE, ND, RA, RB, RL, RLTB, SUNS |
Edit Mask |
Use of an Edit Mask (i.e. an Editcode or Editword) is allowed if the Integer is signed. Integer does not allow edit codes W and Y. May use *DEFAULT. |
Default |
*NULL |
Field Definition Notes
Usage Rules
Partition Type |
|
Files |
Integers may only be used in RDMLX Files. Integers may be used as real fields or keys. |
Logical Views |
Integers may be used as keys to logical views. |
Virtual Fields |
Integers may be used with Mathematical Virtual Fields. Integers may be used as the source field(s). Integers may be used with Code Fragment Virtual Fields. Integers must not be used with Substring, Concatenation or Date Virtual Fields. |
Predetermined Join Fields |
Integers may be used for numeric predetermined joined fields. |
RDML Commands |
Fields of type Integer may be used as a command parameter anywhere Numeric fields may be used, except where digits after the decimal point are required/expected. |
Built-In Functions |
When used in Built-In Functions, integers are valid for arguments of type 'N'. |
Special Values |
*NULL, *NAVAIL, *HIVAL, *LOVAL, *REMEMBERED_VALUE |
Conversion |
It is wrong to convert Integers to/from Date and Time fields. Refer to Field Type Conversions. |
Usage Notes
Platform Considerations
Also See