1 1 7 Packed

LANSA Technical

1.1.7 Packed

Packed fields are exact, fixed-point numeric fields with a precision (# of significant digits), and a scale (# of digits after decimal place). The scale may be 0, indicating a whole number. Packed fields store signed numbers (+/-).

Please review the general 1.1.1 Field Type Considerations.

Field Definition Rules

Rules for defining a Packed field in the repository are:

Length

Packed fields have a maximum length of 63 in an RDMLX partition and 30 in an RDML partition. Maximum number of decimals is 63 in an RDMLX partition and 9 in an RDML partition.

Valid Keyboard Shift

Blanks.

Allowed Attributes

Null values are not allowed.

Edit Mask

Use of an Edit Mask (that is, an Editcode or Editword) is allowed.

Default

Zero.

 

Field Definition Notes

  • Packed and Signed appear to be identical types, however a Packed field will almost always require less storage in memory (and in some databases) than type Signed.

Usage Rules

Partition Type

RDML and RDMLX Partitions.

Files

RDML and RDMLX Files. Packed fields may be used as real fields or  keys.

Logical Views

Packed fields may be used as keys to logical views.

Virtual Fields

Packed fields may be used with Mathematical, Substring, Concatenation or Date Virtual Fields.

Predetermined Join Fields

Packed fields may be used for numeric predetermined joined fields.

Built-In Functions

When used in Built-In Functions, packed fields are valid for arguments of type 'N'.

Conversion

Refer to Field Type Conversions.

 

Platform Considerations

  • Oracle and SQL Server support a maximum of 38 digits of which up to 38 may be decimals. You may use fields with a larger definition, but if these fields are on a file, the column will be created with a smaller size. For example, Packed(63,9) will be created as (38,9). If the field has more than 38 significant digits and you try to write it to the database, an error will occur.

Also See

1.1.8 Signed

1.1.9 Integer

1.1.10 Float

Ý 1.1 Field Types