3 6 17 Convert Special Characters in Field Names

LANSA Technical

3.6.17 Convert Special Characters in Field Names

Specifies whether or not field names should be used as-is when creating database columns from field names.

Default = NO (unchecked/not selected) for files created from LANSA Version 11 SP4 onwards. Files created in earlier versions default to YES (checked/selected).

Prior to LANSA Version 11 SP4, any files compiled under Windows might create database columns that did not match the field names. For example, the SECTION field on the Demonstration file SECTAB was created as S_CTION because SECTION was an SQL Keyword. For the same reason, the column MY@FLD would be created as MY_FLD.

From Version 11 SP4, field names in all new files will not be converted in the database.

This now allows Visual LANSA to use files that previously would not compile on Windows and failed with error 979. For example, if you had two fields named MY@FLD and MY#FLD on a file, the file would fail to build on Windows with the message:

979 FATAL - Fields MY@FLD and MY#FLD resolve to the same SQL column name MY_FLD

The file could only be used on IBM i. Now, you can change the setting to NO (unchecked/not selected) and the file will build successfully.

Warnings

  • LANSA provides no support for changing this setting to NO(unchecked/not selected) for files that have previously compiled successfully on Windows. That is, you must only set it to unchecked/not selected from checked/selected if the file has failed to compile with error 979.
  • LANSA provides no support for changing this setting to YES (checked/selected) for files created with V11 SP4 or later.
  • If you change this setting, you must also recompile and redeploy any functions or components that use SELECT_SQL against the file, and any OAMs for files that have this file as a target of Batch Control or PJFs.
  • Any non-LANSA applications that access the table should use the actual field names for the column names, and should quote these identifiers to avoid any issues.

Tips & Techniques

  • Leave the setting as its default unless you have had problems with error 979 on file compile.

Platform Considerations

  • IBM i: This file attribute does not apply to files in IBM i databases.

Ý 3.6 File Attributes