Using UTF-8-character figurative constants

You can use the figurative constant ALL utf-8-literal in a context that requires UTF-8 characters. ALL utf-8-literal represents all or part of the string that is generated by successive concatenations of the encoding units that make up the UTF-8 literal.

About this task

You can use the figurative constants QUOTE, SPACE, HIGH-VALUE, LOW-VALUE, or ZERO in a context that requires UTF-8 characters, such as a MOVE statement, an implicit move, or a relation condition that has UTF-8 operands. In these contexts, the figurative constant represents a UTF-8-character (UTF-8) value.

When you use the figurative constant QUOTE in a context that requires UTF-8 characters, and the QUOTE compiler option is in effect, its value is UX'22'. If the APOST compiler option is in effect, its value is UX'27'.

When you use the figurative constant HIGH-VALUE in a context that requires UTF-8 characters, its value is UTF-8 character UX'F48FBFBF' corresponding to Unicode code point U+10FFFF, except when HIGH-VALUE is used in a move or compare operation with a fixed byte-length UTF-8 data item that has a length that is not a multiple of 4 bytes. In that case, when HIGH-VALUE is moved into or compared against the final 3, 2 or 1 byte(s) of the UTF-8 data item, the value of HIGH-VALUE is UX'EFBFBF' (U+FFFF), UX'DFBF' (U+07FF), and UX'7F' (U+007F), respectively.

When you use LOW-VALUE in a context that requires UTF-8 characters, its value is UX'00'.

Restriction: When a UTF-8 data item set to HIGH-VALUES is compared to an alphanumeric or national data item set to HIGH-VALUES, they will not compare equal. This is because the HIGH-VALUE value for one data type does not get translated to the corresponding HIGH-VALUE value for a different data type.

Related references  
Figurative constants (Enterprise COBOL for z/OS® Language Reference)  
DISPLAY-OF (Enterprise COBOL for z/OS Language Reference)  
Support for Unicode: Using Unicode Services