UCS2(length)
The UCS2 keyword is used in a free-form definition to indicate that the item is fixed-length UCS-2.
It must be the first keyword.
The parameter specifies the length in double-byte characters. It can be between 1 and 8,386,552.
The parameter can be a literal or a named constant. If it is a named constant, the constant must be defined prior to the definition statement.
In the following example
- field cust_name is defined as a fixed-length UCS-2 field with 100 characters.
- field message is defined as a fixed-length UCS-2 field with 5000 characters. The length is defined using named constant MSG_LEN.
DCL-S cust_name UCS2(100);
DCL-C MSG_LEN 5000;
DCL-S message UCS2(MSG_LEN);
For information on defining a variable-length UCS-2 item, see VARUCS2(length {:2 | 4}).