1 1 3 String

LANSA Technical

1.1.3 String

String is a variable-length character field, with a maximum length between 1 and 65,535. (This is the byte length, not the number of characters.)

Strings store alpha data that is either SBCS, mixed SBCS and DBCS, or DBCS-only. Only the current native codepage is supported.

Strings are classified as strings.

A String retains any trailing blanks, they are significant. When concatenating a String with spaces on the end, those spaces are retained. But the space is NOT SIGNIFICANT for comparisons.

Please review the general 1.1.1 Field Type Considerations.

Field Definition Rules

Rules for defining a String field in the repository are:

Length

Strings may be 1 to 65,535 in length. Strings have no decimals.

Valid Keyboard Shift

Blanks, O, E, J or W.

Allowed Attributes

AB, ASQN, CS, DDNN, FE, FUNC, FUNU, FUNX, JNMC, JNMU, JNMX, JNRC, JNRU, JNRX, LC, ND, PROC, PROU, PROX, RA, RB, RL, RLTB, SREV, SUNI, USRC, USRU, USRX.

Edit Mask

Not allowed.

Default

*NULL

Usage Rules

Partition Type

RDMLX Enabled Partition

Files

Strings may only be used in RDMLX Files. Strings may be used as real or key fields. If used as keys, length must be no more than 4000 bytes.

Logical Views

Strings may be used as key fields. If used as keys, length must be less than 4000 bytes.

Virtual Fields

Strings may be used with Code Fragment Virtual Fields.

Predetermined Join Fields

Strings may be used for lookup predetermined joined fields.

RDML Commands

DEF_HEAD, DEF_FOOT, DEF_BREAK, and DEF_LINE only support printing of RDML fields. Therefore, String fields need to be converted to Alpha to be used in reports.

Built-In Functions

When used in Built-In Functions, Strings are valid for arguments of type 'A'.

Special Values

*NULL, *NAVAIL, *REMEMBERED_VALUE

Conversion

Refer to Field Type Conversions.

Usage Notes

  • Working fields may be defined as TYPE(*STRING).
  • Fields of type String or Char and length of 256 or less may be used almost anywhere that fields of type Alpha may be used.
  • A string of zero length has a space added to it before inserting or updating the database via SQL. This is in order to obtain consistent behaviour between our databases. Without a space, Oracle interprets the data as being SQL Null, which is not strictly true and is not how the other databases behave.

     So, be aware that your application cannot make a distinction between an empty String and a String with 1 blank. Also, concatenations of a zero length String before inserting to the database and after reading may differ by the extra space. Behaviour can be made consistent by truncating trailing spaces before using Strings in an expression. Note that when comparing an empty String in RDML to a String with 1 space read from the database they will compare equal because trailing spaces are not significant in comparisons - they are only significant in expressions, like concatenation.

Platform Considerations

Also See

1.1.2 Alpha

1.1.5 Char

1.1.4 NVarChar

Ý 1.1 Field Types