Problem solve Get help with specific problems with your technologies, process and projects.

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.


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.

Dig Deeper on FTP

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.