TSO/MVS Uploading problem

I'm uploading an ebcdic file(converted from ascii) from Windows OS to Mainframe. My problem is that when I checked the file after uploading it, I see alot of new lines. When I tried to check it with its hex dump I discovered that when mainframe sees a x'15' it translates it into a newline. In the file there are packed decimals so the hex could contain let say a x'001500001c' but when I upload it, mainframe mistook it as a new line. Can anyone help me with this problem?


You should put your FTP client (or library if the upload is done by your code) into binary (IMAGE TYPE) mode instead of ascii/EBCDIC if you are sending a file already in EBCDIC i believe.


It depends on the type of target "file" that you're uploading to.

If you're uploading to a member that has fixed block size (e.g., FB80), you'll need to ensure all the lines are padded out with spaces before you transmit it up (in binary mode).

Text mode transfers are not suitable for binary files (and your files <strong>are</strong> binary if they contain packed decimals - there's no reliable way for FTP to detect real line-end characters).

You'll need to fix your Windows ASCII-to-EBCDIC converter to be able to generate fixed length records.

The only other option is with a REXX script on the mainframe but this would still require being able to tell the difference between a real end-of-line marker and that marker within the binary data.

You could possibly tell the presence of a packed decimal by virtue of the fact that it consisted of BCD nybbles, the last of which is 0xC or 0xD, but that could also cause false positives or negatives.

My advice: when you convert it from ASCII to EBCDIC, pad out the lines to the desired record length at the same time.

The other point I'd like to raise is that if you just want to look at the files on the mainframe (not use them from any code that requires EBCDIC), the ISPF editor includes a few new commands (as of z/OS 1.9 if I remember correctly).

SOURCE ASCII will display the data as ASCII rather than EBCDIC. In addition, the LF command allows you to massage the ASCII stream in an FB member to correctly fix up line endings.


  • How To Read a Date in Java from a COMP-3 field in COBOL?
  • Char Subtraction in c++
  • How to Cache Images Dynamically-Generated with PHP?
  • passing parameter to server in ExtJs
  • Terminal Vim redraw issues in OS X Lion
  • GWT Widget.addHandler
  • How do you keep a running instance for Google App Engine
  • Python: sending key press events over SSH
  • retrieving data from url in iphone
  • Error in making a socket connection
  • What is the difference between a “service account” and an “installed application”?
  • Problem with Django using Apache2 (mod_wsgi), Occassionally is “unable to import from module” for no
  • Python pandas melting data to multiple columns and coulmn names in another column
  • what makes a request a new request in asp.net C#
  • 550 Access denied - Invalid HELO name
  • Spring Cloud Microservice Architecture Confusion
  • OOP Javascript - Is “get property” method necessary?
  • How do I get HTML corresponding to current DOM tree?
  • Transactional Create with Validation in ServiceStack Redis Client
  • Handling un-mapped Rest path
  • Illegal mix of collations for operation for date/time comparison
  • PHP - How to update data to MySQL when click a radio button
  • output of program is not same as passed argument
  • Does CUDA 5 support STL or THRUST inside the device code?
  • How to show dropdown in excel using jrxml (jasper api)?
  • jquery mobile loadPage not working
  • Why winpcap requires both .lib and .dll to run?
  • How to include full .NET prerequisite for Wix Burn installer
  • Unit Testing MVC Web Application in Visual Studio and Problem with QTAgent
  • Acquiring multiple attributes from .xml file in c#
  • How do you join a server to an Active Directory (domain)?
  • Trying to get generic when generic is not available
  • How do I configure my settings file to work with unit tests?
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • Qt: Run a script BEFORE make
  • IndexOutOfRangeException on multidimensional array despite using GetLength check
  • How can I remove ASP.NET Designer.cs files?
  • reshape alternating columns in less time and using less memory
  • Binding checkboxes to object values in AngularJs
  • java string with new operator and a literal