Q

FTP a file that contains exclamation points

How can I FTP a file that contains exclamation points? Currently I'm in ASCII mode and the company that sponsors the site correctly indicates "!" in the file where necessary (within a gift message typically) but the file FTP'd to the iSeries converts the "!" to "|" . Any help would be much appreciated since it will save me the trouble of scanning and replacing the "|".
This sounds like a CCSID (Coded Character Set ID) problem. The current CCSID translates the exclamation point incorrectly -- you need to find a CCSID that will translate it properly without disturbing the other characters. The US-ASCII CCSID is 367, so if you are using another CCSID, you may find that switching to this CCSID could solve the problem. But if you are already using this CCSID, then you may need to use a CCSID that will translate between your keyboard/screen character set and US-ASCII.

However, there are hundreds of CCSIDs! And I am not sure how to find the right one.

Another way of solving this would be to send a test file that contains all the characters and symbols that can be used. Then look at the received file and see where characters differ from the sent file. You can use this information to find or create a translation table that your RPG program can use, or perform your own translation in the code. So if you find that sending "|" gives "!" and sending "!" gives "|" your program can replace "!" with "|" and "|" with "!" in the data before it writes it.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Visit the ITKnowledge Exchange and get answers to your developing questions fast.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.

This was first published in November 2004

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close