225 pts.
 Convert/Supress non UTF-8 to UTF-8 on as/400 while CPYTOSTMF
Hi, I am generating XML from AS/400. I am doing following steps: Creating Flat File wiht RCDLEN (260) and CCSID 65535 (Default). I am reading data from some other Physical File. Putting data in between XML tags in required XML format and writing this record into Flat File. Now flat file contains XML formatted data. I do CPYTOSTMF with STMFCODPAG(*PCASCII). Then I copy the XML file from IFS to PC. Now, If I open the XML file on PC, it gives error some times. Error is File contains non UTF-8 characters, those are not valid in XML file. If I check the data in my original PF, It has some invalid characters. I am getting these data from other open systems into my AS/400. Can some body help How to suppress or convert these characters, so that I can process XML on PC successfully. Thanks Reddy

Software/Hardware used:
ASKED: July 31, 2009  12:01 PM
UPDATED: October 24, 2009  1:16 AM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

First things first — unless you are doing the data conversions in your programming, don’t try to use 65535 as a CCSID. Assign a correct CCSID and let’s see how it looks then. From a known CCSID, we can probably find a proper direction.

And if you’re doing the conversions, please show the code that calls the APIs. Depending on which APIs are shown, other questions about the code will probably follow.

Tom

 108,055 pts.