Modernization Hub

CCS - Coded Character Set

Enhanced Definition

A Coded Character Set (CCS) is a defined collection of characters (letters, numbers, symbols, control characters) where each character is assigned a unique numeric code. In the mainframe and z/OS context, a CCS provides the fundamental mapping required to represent, store, process, and display textual data consistently across systems and applications.

Key Characteristics

    • Character-to-Code Mapping: It defines a one-to-one relationship between an abstract character and its corresponding integer code point.
    • EBCDIC Predominance: On z/OS, the Extended Binary Coded Decimal Interchange Code (EBCDIC) is the native and most prevalent CCS, with various EBCDIC code pages supporting different languages and character sets.
    • Code Pages: A specific implementation of a CCS, defining the exact byte representation for each character. For example, IBM-037 is an EBCDIC code page for US English, while IBM-1047 is for Latin-1.
    • Data Integrity: Ensures that character data is interpreted and processed correctly, preventing data corruption or misrepresentation when moved or displayed.
    • Globalization Support: Modern CCSs, like Unicode (specifically UTF-8 and UTF-16), are increasingly used on z/OS to support a vast range of international languages and symbols.
    • System-wide Impact: The default CCS affects how character literals are compiled in COBOL, how data is stored in files, and how terminals display information.

Use Cases

    • Data Storage and Retrieval: Storing character data in VSAM files, sequential datasets, DB2 tables, and IMS databases, where the CCS dictates the byte representation.
    • Application Processing: COBOL, PL/I, and C/C++ programs on z/OS process character strings based on the system's or application's defined CCS, impacting string comparisons, manipulations, and I/O operations.
    • Data Interchange: Converting data between mainframe EBCDIC systems and distributed ASCII or Unicode systems (e.g., for file transfers, web services, or database replication).
    • Terminal Display: Ensuring that characters entered and displayed on 3270 terminals (e.g., via CICS transactions or TSO sessions) are correctly rendered according to the terminal's and system's CCS.
    • Internationalization: Developing applications that support multiple languages by using appropriate EBCDIC code pages or migrating to Unicode for broader character support.

Related Concepts

A CCS is foundational to how character data is handled on z/OS. It directly relates to Code Pages, which are the concrete implementations of a CCS, defining the byte-level encoding. EBCDIC is the primary CCS family on z/OS, contrasting with ASCII used on many distributed systems, necessitating data conversion utilities (like ICONV or CPYTOIMPF in z/OS UNIX System Services) when data moves between these environments. Modern systems increasingly use Unicode (e.g., UTF-8) as a universal CCS, and z/OS provides robust support for it, often requiring specific compiler options or runtime settings for COBOL and other languages.

Best Practices:
  • Explicit Conversion: Always explicitly define and manage CCS conversions when exchanging data between different systems or applications, especially between EBCDIC and ASCII/Unicode.
  • Consistent Code Pages: Strive for consistent code page usage within an application or data flow to minimize conversion overhead and prevent data integrity issues.
  • Unicode Adoption for New Development: For new applications, especially those requiring internationalization, consider adopting Unicode (UTF-8) on z/OS to leverage its universal character support and simplify future global expansion.
  • Compiler Options: Be aware of and correctly configure compiler options (e.g., CODEPAGE in COBOL) that influence the CCS used for character literals and data types within programs.
  • Thorough Testing: Rigorously test all data conversions and character processing to ensure that all characters, especially special characters and those from extended character sets, are handled correctly across all system boundaries.

Related Vendors

IBM

646 products

Applied Software

7 products

Trax Softworks

3 products

Related Categories

Operating System

154 products

Encryption

41 products

Files and Datasets

168 products

Browse and Edit

64 products