× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Dan,

Most computer systems (with IBM i being the exception) do not have any clue what character encoding a file contains. On Windows you cannot denote that a file is ASCII, Latin-1, or Unicode. Not in the "file description", at least... some types of files (such as XML) store this information inside the file data itself, but if it does that, it's particular to that specific file format. It doesn't apply to the computer's file systems as a whole.

Therefore, FTP has no way of knowing what CCSID the remote file is. It has no way to detect that. All it knows is that it's a string of bytes.

If you ask FTP to translate it by using ASCII mode, it assumes the remote file is in the CCSID you specified on the FTP command. So, on the Windows side of the connection, it expects the file to be in ASCII, and in the CCSID you specified. (That's why you can't specify 37 or 500 for that parameter -- it's supposed to be an ASCII CCSID)

FTP then uses a combination of the CCSID of an existing file, the CCSID of your job, and the remote ASCII CCSID you specified to figure out what CCSID to translate to on the EBCDIC end of things.

I'm not exactly sure how it's arriving at 500 in your case, though.

My suggestion is that you pre-create the local file in the CCSID you want to use, and try the transfer again. It should therefore translate to the CCSID of the pre-created file.

However, that still might not work -- because (again) FTP doesn't actually know what the remote file is. So you may need to find out what CCSID the remote file is, and specify that as the CCSID parameter on the FTP command.


On 2/19/2010 4:57 PM, Dan wrote:
I have an iSeries application that performs a file transfer to get a file
from a Windows server via FTP.

When the file is received on the iSeries, it has a CCSID of 500. Left and
right brackets appear on the iSeries file as a cent sign and exclamation
point, respectively. When I do the FTP on my PC and view the file in
notepad or any editor, the brackets appear as expected.

The iSeries application is expecting the brackets, and I'd like to have the
characters translated correctly.

There is a CCSID parameter on the FTP command, but it did not like 37 nor
500, so I obviously am missing the point of this parameter.

Specific RTFMs or even outright solutions would be greatly appreciated!

- Dan


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.