Currently (as of version 2.3.0), the Search and Replace task only supports the replacement of a single character or a collection of contiguous characters (such as a word or sentence). So, the only way to achieve this effect within GoAnywhere is to add one Search and Replace task for each character or word you wish to replace. This approach, however, would cause the project to scan the entire file once for each search and replace task within the project.
All data translation tasks, such as CSV, XML, Fixed-Width, etc... support an encoding option that allows you to specify the character set of the file you are working with. This allows GoAnywhere to work with these special characters, which, in many cases, eliminates the need to remove such characters from the data.
Would you provide more information as to why you need to change the character set? And what outcome are you trying to achieve? There may be an alternative approach depending on what you need.
For this project, we were picking up some files from an affiliate. We then put them to the IFS. From there, we use CL commands to upload these files to the AS400 and process them. The problem is that these files occasionally contain some "foreign" characters. When uploading these files using the CPYFRMSTMF command, these characters are not translated properly. I have tried finding a solution with the CPYFRMSTMF command and the proper CCSID's, but haven't had any luck. So I was hoping I could do it in GoAnywhere before the CPYFRMSTMF ever sees the data.
For example, the following data may be in the file:
After copying this info up to the AS400, it may convert it to the following:
CAÃ ON CITY
Not only did it convert the character, but it also added a space.
So, anyway, I am looking for a solution to either convert these characters before the CPYFRMSTMF is performed, or to find a solution to the CPYFRMSTMF bad conversion.
1) If you wish to use the CPYFRMSTMF command to upload the file, try setting the Stream File CCSID (STMFCCSID) option to *PCASCII. This CCSID preserves those characters.
2) If the file is one of the GoAnywhere supported file types (Fixed width or CSV), you could create a Read CSV or Read Fixed Width task within your project to read the data out of the file, then use an SQL task to insert the data into the physical file. This also preserves the characters.