Convert/Supress non UTF-8 to UTF-8 on as/400 while CPYTOSTMF
155 pts.
0
Q:
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
ASKED: Jul 31 2009  12:01 AM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
155 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
Last Answered: Jul 31 2009  12:01 AM GMT by NarasimhaReddy   155 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

TomLiotta   7590 pts.  |   Oct 24 2009  1:16AM GMT

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

 
0