Rational Developer for System z
COBOL for Windows, Version 7.5, Language Reference


NATIONAL-OF

The NATIONAL-OF function returns a national character string consisting of the national character representation of the characters in argument-1.

The type of the function is national.

Format
Read syntax diagramSkip visual syntax diagram>>-FUNCTION NATIONAL-OF--(--argument-1--+------------+--)------><
                                        '-argument-2-'     
 
argument-1
Must be of class alphabetic, alphanumeric, or DBCS. argument-1 specifies the source string for the conversion.
argument-2
Must be an integer or of class alphanumeric. argument-2 identifies the source code page for the conversion.

argument-2 must identify an EBCDIC, ASCII, UTF-8, UTF-16, or EUC code page, or any of the code pages described in Appendix F. Code page names, except UTF-16LE. An EBCDIC or ASCII code page can contain both single-byte and double-byte characters.

When argument-2 is an integer, the integer must be a valid CCSID number. When argument-2 is of class alphanumeric, its content must be a primary or alternate code page name as described in Appendix F. Code page names.

If argument-2 is omitted, the source code page is determined as follows:

The returned value is a national character string consisting of the characters of argument-1 converted to national character representation. When a source character cannot be converted to a national character, the source character is converted to a substitution character. The substitution character is:

No exception condition is raised.

The length of the returned value depends on the content of argument-1 and the characteristics of the source code page.

Usage notes:

Exception: If the conversion fails, a severe runtime error occurs.


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)