Skip to content

Conversation

@IgorTodorovskiIBM
Copy link
Collaborator

I am added a new environment variable because the existing __UNTAGGED_READ_MODE is confusing to customers. We will use __UNTAGGED_FILE_ENCODING

Summary:

  • Add __UNTAGGED_FILE_ENCODING variable for encoding-first untagged file handling
  • Support semantic tokens: DETECT, IGNORE, WARN
  • Support numeric CCSIDs (e.g., 1047, 819, 1208)
  • Support encoding names via z/OS __toCcsid() (e.g., UTF-8, IBM-1047, ASCII)
  • New variable takes precedence over legacy __UNTAGGED_READ_MODE
  • Fully backwards compatible with existing __UNTAGGED_READ_MODE behavior

Implementation:

  • Parser integrated into src/zos.cc (internal, no new library needed)
  • Added __get_untagged_file_ccsid() getter for CCSID retrieval
  • Updated __file_needs_conversion_init() to use explicit CCSID when specified
  • Comprehensive man page documentation with examples

Testing:

  • Integration tests verify parsing, precedence, and behavior mapping
  • Tests confirm backwards compatibility with legacy variable

Limitations:

  • Current conversion infrastructure supports EBCDIC (1047) ↔ ASCII (819)
  • Other CCSIDs parsed correctly but conversion limited until iconv() integration

   Summary:
   - Add __UNTAGGED_FILE_ENCODING variable for encoding-first untagged file handling
   - Support semantic tokens: DETECT, IGNORE, WARN
   - Support numeric CCSIDs (e.g., 1047, 819, 1208)
   - Support encoding names via z/OS __toCcsid() (e.g., UTF-8, IBM-1047, ASCII)
   - New variable takes precedence over legacy __UNTAGGED_READ_MODE
   - Fully backwards compatible with existing __UNTAGGED_READ_MODE behavior

   Implementation:
   - Parser integrated into src/zos.cc (internal, no new library needed)
   - Added __get_untagged_file_ccsid() getter for CCSID retrieval
   - Updated __file_needs_conversion_init() to use explicit CCSID when specified
   - Comprehensive man page documentation with examples

   Testing:
   - Integration tests verify parsing, precedence, and behavior mapping
   - Tests confirm backwards compatibility with legacy variable

   Limitations:
   - Current conversion infrastructure supports EBCDIC (1047) ↔ ASCII (819)
   - Other CCSIDs parsed correctly but conversion limited until iconv() integration
@IgorTodorovskiIBM IgorTodorovskiIBM marked this pull request as draft November 25, 2025 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants