So i am reading an XML file from request note of flow. And need to convert XML data to blob.
Asked
Active
Viewed 2.2k times
2 Answers
2
Try something like this:
CAST( MYLITTLESTRING AS BLOB CCSID InputRoot.Properties.CodedCharSetId)

Petter Nordlander
- 22,053
- 5
- 50
- 84
-
It gives error such as like this: String is not of correct form for byte array. Must consist of only 0..9,a..f,A..Z – Piyush Jan 03 '17 at 12:11
-
Something like this works though: CAST( MYLITTLESTRING AS BLOB CCSID InputRoot.Properties.CodedCharSetId) – Piyush Jan 03 '17 at 12:19
-
Thanks @Piyush - CCSID is now included in answer. – Petter Nordlander Jan 08 '17 at 16:36
-
The answer of PetterNordlander is right, but for an answer with a list of sources see my answer [here](https://stackoverflow.com/a/44944872/6679645). @PetterNordlander maybe you can provide your answers with sources in the future :-) – Yannick Jul 06 '17 at 09:33
0
If you receive messages from both ASCII and EBCDIC based platforms you should include a CCSID often based on the inbound messages CodedCharSetId.
DECLARE StaticValueBlob BLOB CAST('StaticValue' AS BLOB CCSID InputRoot.Properties.CodedCharSetId);
If you are looking to get the whole XML document as a BLOB then you will want to use the ResetContentDescriptor Node instead.

TJA
- 2,969
- 2
- 25
- 32