79766454

Date: 2025-09-16 16:11:25
Score: 1
Natty:
Report link

While phunsoft gave an excellent solution, I felt I should suggest an alternative approach.

By default, the ftp server in Z/OS in ASCII mode translates EBCDIC to ASCII and vice versa during the transfer, which simplifies text transfers considerably. To perform an ASCII-mode transfer in Python you would need to use storlines or readlines instead of storbinary or readbinary.

One caution--EBCDIC encoding of the square bracket ([]) is ambiguous--there are two encodings that might be used for it. If you're uploading or downloading code in a language for which those are a syntactical element this may lead to issues.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: J.Clarke