Mainframe Path Start learning free
CoreTrouble

A transferred file is unreadable

Text that looks fine on one platform is gibberish on the other.

Almost always character encoding

Traditional z/OS data is EBCDIC; files from other platforms are usually ASCII or UTF-8. Whether a tool converts depends on the file's tag and the transfer mode used.

Diagnose

  1. ls -T on the Unix file — is it tagged, and as what?
  2. Was the transfer done in text or binary mode? Text converts; binary does not.
  3. View the file with HEX ON. EBCDIC spaces are x'40'; ASCII spaces are x'20'. Digits are F0–F9 in EBCDIC, 30–39 in ASCII.
  4. Check for stray carriage returns (x'0D') from a Windows source.

Fix

Stuck on something else?
Ask the community or search the full course.

Ask a question