1.1.5 Char

A Char is a fixed-length character field, with a length between 1 and 65,535. (This is the byte length, not the number of characters.) Char fields with lengths of 256 or less are equivalent to the existing Alpha field.

Char fields store alpha data that is either SBCS, mixed SBCS and DBCS, or DBCS-only. Chars are classified as strings.

Depending on the database type, Char may or may not treat trailing blanks as significant. If trailing blanks are not desired, a String field should be used.

Please review the general 1.1.1 Field Type Considerations.

Field Definition Rules

Rules for defining a Char field in the repository are:

Length

Chars may be 1 to 65,535 in length. Chars 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

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

Logical Views

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

Virtual Fields

Chars may be used with Code Fragment Virtual Fields.

Predetermined Join Fields

Chars 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, Char fields need to be converted to Alpha to be used in reports.

Built-In Functions

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

Special Values

*NULL, *NAVAIL, *REMEMBERED_VALUE

Conversion

Refer to Field Type Conversions.

Usage Notes

Platform Considerations

Tips & Techniques

Also See

1.1.2 Alpha

1.1.3 String

1.1.6 NChar