Input can be any variable or expression that is assignment compatible
with the CHAR(1) type. For example, you can use a STRING variable
as input, but only the first character is evaluated.
code
The decimal ASCII or EBCDIC (depending on your environment) value
of character is returned as an INT. If character is
null, the function returns a null value.
Compatibility considerations
Table 1. Compatibility
considerations
Platform
Issue
JavaScript generation
The function strLib.charAsInt() is not
supported.
Example
source STRING = "ABC";
result INT?;
result = strLib.charAsInt(source);
// result is 65 on ASCII
// 193 on EBCDIC