Discussion Locked

TSO/FTP question

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I know that there may not be a lot of people out there still using the mainframe, but I have a question.

I need to transfer data from my dataset on TSO (mainframe) to an FTP server.

My data file is in EBCDIC. The record length of the file is 200. There are 50 records. When I upload it as an ASCII file it carries the CRLF (carriage return/line feed).

What can I do to upload the file unto the FTP server as ASCII but without the CRLF??

Your help is much appreciated. Thank you in advance.

3 replies

by softcorp.us

Hello Jac...

When you use FTP to transfer a file, the mainframe side has an option to convert to ASCII or not, and to append CRLF or not. You simply need to turn the "append CRLF" option off when you do the transfer. I would give you the exact syntax but I don't have access to a mainframe as I write this. You can get this information during an FTP session with the mainframe's FTP server using the "remote help" command.

The steps are:

1. On your PC, use the FTP command to connect to your mainframe's FTP server.

2. Change the transfer mode so that the transfer takes place converting EBCDIC to ASCII but without appending CRLF.

3. Transfer the file to your PC.

4. Disconnect.

5. Connect your PC to the FTP server you want to upload to.

6. Transfer the file as a binary file (no converions will take place). To do that, type 'binary' (without the quotes) during the FTP session before you transfer the file.

What you'll end up with is exactly 10,000 bytes (LRECL=200 times 50 records, in ASCII, but without CRLF).

If you have any questions, please contact me directly.

-----Steve Jackson

CEO/CSA
Software Corporation (Softcorp)
http://www.softcorp.us/probono
Advanced pro bono tools and utilities free for personal use

This discussion is closed to new replies.