14 2 1 IBM i Defined Data Areas

LANSA Application Design

14.2.1 IBM i Defined Data Areas

Before attempting to execute applications that manipulate data areas via the associated "get" and "put" Built-In Functions, please note:

  • Data areas will be automatically enrolled in the LX_DTA table when the first attempt is made to access a non-enrolled data area.
    Note: The data area locking/unlocking logic actually uses the LOCK_OBJECT and UNLOCK_OBJECT functions. A "Data area not found" error may leave the data area locked in the locking table. To remove this lock use a small function that uses the UNLOCK_OBJECT, or use a DBMS direct access tool to remove the lock row from table LX_FOL.
  • Alternatively, you may manually enroll the Data Area in the LX_DTA table by using a DBMS supplied direct access tool. Specify the library name as *LIBL unless you have an application that uses specific library names.

    Specify the data area type as "A" (alphanumeric) or "N" or "D" (numeric) when enrolling it in table LX_DTA. Note that both *AUTONUMxxxxxxxxxx and *AUTOALPxxxxxxxxxx data areas should be enrolled as "N" or "D" (numeric) values. Even though *AUTOALPxxxxxxxxxx values are ultimately mapped into alpha fields they are actually a numeric value.
  • The truncation of numeric data area values may differ from the IBM i implementation. In a poorly designed application setting a 4 digit numeric data area from a 5 digit numeric field that contains 54321 would set the data area value to 4321. Under Visual LANSA, the data area value would be set to 54321. This is unlikely to cause a problem because most applications should be implemented to handle the "rollover" point themselves.
  • The "hiding" of packed decimal data in alphanumeric data areas is not supported.
  • Numeric data areas can be up to 24,9 precision.