Convert/Supress non UTF-8 to UTF-8 on as/400 while CPYTOSTMF

225 pts.
Tags:
AS/400
CPYTOSTMF
UTF-8
XML
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

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    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
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following