Correlative and Conversion Codes

conversion codes

This appendix describes the correlative and conversion codes used in dictionary entries and with the ICONV, ICONVS, OCONV, and OCONVS functions in BASIC. Use conversion codes with the ICONV function when converting data to internal storage format and with the OCONV function when converting data from its internal representation to an external output format. Read this entire appendix and both the ICONV function and OCONV function sections before attempting to perform internal or external data conversion.

Note: If you try to convert the null value, null is returned and the STATUS function returns 1 (invalid data).

The NLS extended syntax is supported only for Release 9.4.1 and above.

The following table lists correlative and conversion codes.

Table 1. Correlative and Conversion Codes
Code Description
A Algebraic functions
C Concatenation
D Date conversion
DI International date conversion
ECS Extended character set conversion
F Mathematical functions
G Group extraction
L Length function
MB Binary conversion
MCA Masked alphabetic conversion
MC/A Masked nonalphabetic conversion
MCD Decimal to hexadecimal conversion
MCDX Decimal to hexadecimal conversion
MCL Masked lowercase conversion
MCM Masked multibyte conversion
MC/M Masked single-byte conversion
MCN Masked numeric conversion
MC/N Masked nonnumeric conversion
MCP Masked unprintable character conversion
MCT Masked initial capitals conversion
MCU Masked uppercase conversion
MCW Masked wide-character conversion
MCX Hexadecimal to decimal conversion
MCXD Hexadecimal to decimal conversion
MD Masked decimal conversion
ML Masked left conversion
MM NLS monetary conversion
MO Octal conversion
MP Packed decimal conversion
MR Masked right conversion
MT Time conversion
MU0C Hexadecimal Unicode character conversion
MX Hexadecimal conversion
MY ASCII conversion
NL NLS Arabic numeral conversion
NLS Conversion using NLS map name
NR Roman numeral conversion
P Pattern matching
Q Exponential conversion
R Range function
S Soundex
S Substitution
T Text extraction
T File translation
TI International time conversion