Question Locked

FTP Special Characters from Mainframe to Windows

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

Hello,

I've a file in Mainframe that contains special characters like "??? ?". When I transfer this file to Windows using FTP, the special characters becomes junk in the .txt file, in Windows. How can I overcome this?

18 replies

by sthilakraj

Thanks Old Mycroft, but that is what we are doing currently and it is not working out. A small correction in my question, that we are sending this file from Mainframe to a Windows based system.

by older mycroft

That's not working ?

Do I take it that you are renaming the file to become something without 'special' characters but the result of the ftp is STILL corrupted ?

by sthilakraj

The problem is, I need to see the special characters as it is. The special characters appears in the Mexican names, in the mainframe and we FTP it to a web based application. So, when we transfer the file, which is in EBCDIC format, to Window, which accepts only ASCII format, we are losing out the data.

When you said "Rename" I misunderstood to the file name, I believe you wanted me to do some mapping to the data before sening and after receiving, am I right?

by robo_dev

For example, using Core FTP client, you must issue the appropriate code page command:

.............
->:> SITE SBD=(IBM-1047,ISO8859-1)
->:< 200 SITE command was accepted
............

This will allow the host to convert the data as it is being sent.

by bizzo

Can you force the file transfer to be in binary and not ASCII?

by robo_dev

By using the FTP SBD (SBDATACONN), parameters, the host can convert the data to ascii (or whatever codepage you want) when sending it.

If you were scripting a mainframe FTP transfer, you would need the Site parameters, unless it was another mainframe.

by sthilakraj

Ok... so if I write a program to convert allt he characters to ASCII in the host, is there any SITE command I need to issue to command that the data is already ASCII and no conversion is required while FTP? Is that "Binary"?

Thanks for all the replies guys. Right now, I've two option, to issue the SITE Command suggested by Robo_dev (SITE SBD=(IBM-1047,ISO8859-1)) and see if things are working. Am testing this.
The other option is to convert all the characters in the file to have ASCII instead of EBCDIC and then FTP them. My fingers crossed!!!

by sthilakraj

Ok... we actually encrip the data and send to Windows based FTP and in the client site they decrypt and load the file to DB (SQL Server). Earlier we had problems transferring the encrypted file, which is now fixed. If I get to see the decrypted file, we see as it was sent. But when we load this to their DB, the special characters are lost. I do not know how exactly they load it, but the output is seen as "???" instead of the special characters. It seems the file should be in UTF-8 instead of ASCII. Any help!!?

by ic-it

I may be off base, but is the DB setup to display/import those characters?
Or is it possible that the encryption technique is not decrypting them correctly?

by sthilakraj

It seems the DB accepts only UTF-8 format and we are sending them in ASCII format.

The decrypted file is exactly same as the input file, but in ASCII format.

by davechristensen

Because you have a chance that there are COMP or packed fields in your mainframe data record, I'd recommend you use BINARY and send the file to the LAN.

Once there, you can use the Record Edit program (It's known as Record Editor and is found on Source Forge at http://record-editor.sourceforge.net/) This will allow you to open, browse and/or export data from the mainframe file to a format you can use on the LAN.

Also, you could utilize Host Integration Server to do it as well though it's a bit more involved and requires purchase of several software packages.

by pranabpathak

Hi,
I am facing the similar situation. If you find any solution of the problem - 'FTP Special Characters from Windows to Mainframe' then pls reply me @ pranabpathak@gmail.com

by ron k.

Remove your email address from your post before spambots get it.
If TR members need to get in touch with you besides posting to this discussion they can send you peermail directly from TR if you have the peermail option turned on.

by davechristensen

I like your suggestion, but don't know how to remove it from already posted items? Do you know how to do that?

My email address was my user id, but I've now changed that.

by davechristensen

I was able to solve the issue by using the SITE command. That also allowed me to set record length, etc., with binary file transfers.

by davechristensen

Could you transfer the file as EBCDIC (binary)?

Do the hex characters appear in occasional records or are they appearing throughout the file?

There's a product called Record Edit that's on Source Forge that would allow you to look at the file in EBCDIC and would also apply the original COBOL copybook against the file.

This discussion is closed to new replies.