Hello,
not sure if this is the correct place for my question.. i think it is a mix between sql and rpg.
In a SQLRPGLE PGM i want to build a xml, which i want to store in the database later.
When i call the XMLELEMENT function staticly everything is fine. But when i call this function with a variable definded in rpg type of char or varchar, i have the feeling i ran into some translation problems or i don't know...
In my SQLRPGLE i do something like this:
exec sql
values(xmlelement(name "MyVal", :MyVal)) into :MyXmlString;
The value of MyXmlString contains a well formed xml element but the value is not what i put in there, but i think it could be bit data (the string test transformed to 48Xi40A=).
Does anyone know how to deal with this? Or worked with the sql xml functions in a sqlrpgle program?
Worst solutions for me would be, that i have to code all the variable with sqltype keyword as clob, but i want to walk around this, because in my opinion it get's to much code and it is not so nice to read, therefore i could also concat strings to build xml...
Hope someone can give me a hint.
Thanks in advance for any help.
Greetings Manuel
not sure if this is the correct place for my question.. i think it is a mix between sql and rpg.
In a SQLRPGLE PGM i want to build a xml, which i want to store in the database later.
When i call the XMLELEMENT function staticly everything is fine. But when i call this function with a variable definded in rpg type of char or varchar, i have the feeling i ran into some translation problems or i don't know...
In my SQLRPGLE i do something like this:
exec sql
values(xmlelement(name "MyVal", :MyVal)) into :MyXmlString;
The value of MyXmlString contains a well formed xml element but the value is not what i put in there, but i think it could be bit data (the string test transformed to 48Xi40A=).
Does anyone know how to deal with this? Or worked with the sql xml functions in a sqlrpgle program?
Worst solutions for me would be, that i have to code all the variable with sqltype keyword as clob, but i want to walk around this, because in my opinion it get's to much code and it is not so nice to read, therefore i could also concat strings to build xml...
Hope someone can give me a hint.
Thanks in advance for any help.
Greetings Manuel
Comment