CHARSET and MF_CHARSET: EBCDIC Execution, In-Flight Code Set Translation, and System Library Constraints
In Rocket Enterprise Developer / Enterprise Server 12.0 for Linux/UNIX, character encoding is governed by the CHARSET compiler directive and the MF_CHARSET region setting. CHARSET"EBCDIC" cascades SIGN"EBCDIC", NATIVE"EBCDIC", and DEFAULTBYTE"0", while MF_CHARSET=E aligns Enterprise Server regions. Code set translation between host ASCII and application EBCDIC is managed via MFCODESET using country codes or 8-digit hexadecimal CCSID pairs. When running under CHARSET"EBCDIC", COBOL system library routines requiring alphanumeric parameters must receive ASCII data. [1] [2] [3] [4]
Read the full briefing
Scope and Architectural Overview
This article covers character encoding configuration, region character set alignment, and translation mechanics in Rocket Enterprise Developer / Enterprise Server 12.0 for Linux/UNIX.
In enterprise application modernization, programs migrated from IBM mainframe z/OS environments rely on the EBCDIC character set, whereas Linux/UNIX host systems operate natively in ASCII. Rocket Enterprise Developer provides dual-character-set support, enabling programs to compile and execute in native EBCDIC while interfacing with the host operating system, filesystems, and databases.
Managing this behavior requires coordinating the CHARSET compiler directive, the Enterprise Server region character set documented in ASCII/EBCDIC, and the runtime translation module managed by The code set translation environment variable.
The CHARSET Compiler Directive and Cascaded Settings
The CHARSET compiler directive establishes the character set of the compiled application:
CHARSET"char-set"The parameter must be either ASCII or EBCDIC. The default setting is CHARSET"ASCII".
Setting CHARSET triggers immediate and end-of-phase compiler defaults:
CHARSET"ASCII": SetsDEFAULTBYTE"32"(ASCII space),SIGN"ASCII", andNATIVE"ASCII"immediately.CHARSET"EBCDIC": SetsDEFAULTBYTE"0"(null bytex'00') immediately, and setsSIGN"EBCDIC"andNATIVE"EBCDIC"at the end of the syntax check phase.
Under CHARSET"EBCDIC", all alphanumeric literals, figurative constants, and collating sequence comparisons evaluate using EBCDIC character code points.
Region Character Set Alignment via MF_CHARSET
By default, an Enterprise Server region operates using ASCII. When running JCL batch jobs, CICS transactions, or TSO commands compiled with CHARSET"EBCDIC", the region environment must match the program encoding.
To configure an Enterprise Server region for EBCDIC execution, administrators specify MF_CHARSET in the [ES-Environment] configuration section in ESCWA:
[ES-Environment]
MF_CHARSET=EBCDICAlthough MF_CHARSET=EBCDIC or MF_CHARSET=ASCII can be entered for clarity, only the first character (E or A) is evaluated by the runtime.
When an Enterprise Server region runs under MF_CHARSET=E:
- Datasets allocated by the region inherit EBCDIC as their default character set attribute.
- Line Sequential (LSEQ) files and JCL in-stream SYSIN datasets are automatically converted by the runtime file handler to match the target program's encoding.
- The documentation explicitly instructs not to mix ASCII and EBCDIC programs within the same execution unit; if programs of differing character sets interact, the application is responsible for explicit data conversion.
In-Flight Translation via MFCODESET
As outlined in Code set translation, character translation between the host environment and an EBCDIC program is governed by the MFCODESET environment variable.
MFCODESET accepts two formats:
- Four-Digit Country Code: Defines a standard country code translation (e.g.,
set MFCODESET=0285translates between ASCII and UK English EBCDIC). - Eight-Digit Hexadecimal CCSID Pair: Formatted as
xxxx(a 4-character hex string for the EBCDIC CCSID) followed byyyyy(a 4-character hex string for the ASCII CCSID):
# Translate between MS-WIN Latin-1 (CCSID 1252 / 04E4) and IBM EBCDIC (CCSID 37 / 0025)
export MFCODESET=002504E4Applications requiring programmatic buffer translation between installed CCSID tables can call the CBL_CCSID_CONVERT or _CODESET runtime library routines.
Operational Nuances and System Library Restrictions
- COBOL System Library Parameter Restriction: Under
CHARSET"EBCDIC", COBOL system library routines (including standardCBL_subroutines) that accept or return alphanumeric parameter data cannot process EBCDIC strings directly. All alphanumeric parameter data passed to system library routines must be converted to ASCII before invocation. - JVM COBOL Directive Collision: In JVM COBOL, combining
SIGN"EBCDIC"with any one ofHOST-NUMMOVE,HOST-NUMCOMPARE, orSIGN-FIXUPis an invalid combination that is rejected at compilation. In native COBOL on Linux/UNIX, this combination is permitted. - Deployed DBCS Dependencies: Deployed native self-contained or JVM COBOL applications relying on built-in double-byte character set (DBCS) translations (code sets 81, 82, 86, 886, and 941) must deploy the corresponding
.E2Aand.A2Emapping files from$COBDIR/etc/codesetand pointMFCODESET_DBCSDIRto their runtime directory.
Documentation Takeaway
In Rocket Enterprise Developer and Enterprise Server 12.0 for Linux/UNIX, EBCDIC modernization requires synchronizing the CHARSET"EBCDIC" compiler directive with the region's MF_CHARSET=E configuration; character mapping is driven by MFCODESET using country codes or 8-digit hex CCSID pairs, and developers must supply ASCII data when calling runtime system libraries that accept alphanumeric parameters.