• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

FTP from Windows-NT folder into iSeries creates leading garbage characters

Frosty the Coder

Legendary Poster

I'm trying to FTP a large XML document from a windows-NT folder into the iSeries IFS.
Looking that the XML, via a browser, there are no characters prior to the leading <.

When it gets to the IFS, there are three characters, that cause XML-INTO to fail.

In my FTP I have tried "ASCII"; "BIN"; and "TYPE C 819".
The first two work, but don't prevent the issue.
"TYPE C 819", which should change the CCSID to 819, yields "501 parameter not understood".

I'm at a loss to understand, or prevent this.

Searching JDEList archives, I did see that this has happened to others, but don't see a resolution that I can get to work.
Searching GOOGLE, I've seen a couple suggestions to use the "TYPE C ccsid".

Can anyone explain why this is happening and how to fix it?


Frosty the Coder

Legendary Poster
OK, a workaround was found.
After the FTP into the IFS, issuing a CPY of the object allows me to change the CCSID and drop the garbage intro.



Well Known Member
Frosty -

Assuming that the XML document is encoded as UTF-8, it is probably an (unnecessary) Byte Order Mark in the first three positions of the file. Open the file with a PC text editor which has a hex mode and view the data in hexadecimal view. You'll no doubt see the three hex values of EF BB BF which appear as text characters .

See: https://en.wikipedia.org/wiki/Byte_order_mark