Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

CHARACTER

Example

CHARACTER returns the character value of x, with a length specified by y. CHARACTER also supports conversion from graphic to character type.

Read syntax diagramSkip visual syntax diagram>>-CHARACTER(x-+----+-)----------------------------------------><
               '-,y-'
 

Abbreviation: CHAR

x
Expression.

x must have a computational type.

When x is nongraphic, CHARACTER returns x converted to character.

When x is GRAPHIC, CHARACTER returns x converted to SBCS characters. If a DBCS character cannot be translated to an SBCS equivalent, the CONVERSION condition is raised.

The values of x are not checked.

y
Expression. If necessary, y is converted to a real fixed-point binary value.

If y is omitted, the length is determined by the rules for type conversion.

y cannot be negative.

If y = 0, the result is the null character string.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)