Search on this Website

Friday, April 30, 2010

Error : In Unicode, DESCRIBE LENGTH can only be used with the IN BYTE MODE or IN CHARACTER MODE addition

Error : In Unicode, DESCRIBE LENGTH can only be used with the IN BYTE MODE or IN CHARACTER MODE addition
.

Cause: In some cases, the syntax rules that apply to Unicode Programs are different than those for non-Unicode programs For example, if one uses the addition LENGTH, one must also use one of the two additions IN CHARACTER MODE or IN BYTE MODE in Unicode systems.

Solution: Specify the mode depending upon the field types.



... IN CHARACTER MODE

This addition can only be used for character-type fields and in combination with the addition
LENGTH. The length of the field f is determined in characters.

... IN BYTE MODE

This addition can only be used in combination with the addition LENGTH. The length of the
field f is determined in bytes.

Example:

DATA: FLD(8),
LEN TYPE I,
* DESCRIBE FIELD FLD LENGTH LEN.
DESCRIBE FIELD FLD LENGTH LEN IN CHARACTER MODE.

No comments: