Posted: Tue Oct 09, 2007 11:33 am Post subject: CREATE FIELD options
Voyager
Joined: 25 Apr 2007 Posts: 83 Location: Melbourne
Hi All,
I am trying to parse a TDS message and create multiple XML messages through the original message.
I am parsing my message and putting it in the environment.
Quote:
SET inBitstream= CAST(InputRoot.BLOB.BLOB AS BLOB CCSID inCCSID);
CREATE LASTCHILD OF Environment.Mydata DOMAIN('MRM')
PARSE(inBitstream
Options ValidateNone
ENCODING inEncoding
CCSID inCCSID
SET '12342ac002001'
TYPE 'MYMessage'
FORMAT 'TDS1');
Now i am trying to create XML message from that message
Quote:
CREATE LASTCHILD OF OutputRoot.XMLNS.MyMessage Domain('XMLNS') NAME 'MyMessage' VALUE Environment.Mydata.XMLNS.Persn1Detail;
Where person1Detail is another element in the TDS message.
in the output i don't get any data under Persn1Detail element,
As I assumed that Broker saves the message tree in XML structre, if yes then shouldn't it be working?
Your first CREATE will put your message tree under Environment.Mydata.MRM.
Your second CREATE statement will attempt to put data under OutputRoot.XMLNS.MyMessage.MyMessage.
And is looking to find data from Environment.Mydata.XMLNS. Which doesn't exist, unless you've done something in between your first and second CREATE that you haven't shown. _________________ I am *not* the model of the modern major general.
Your first CREATE will put your message tree under Environment.Mydata.MRM.
Your second CREATE statement will attempt to put data under OutputRoot.XMLNS.MyMessage.MyMessage.
And is looking to find data from Environment.Mydata.XMLNS. Which doesn't exist, unless you've done something in between your first and second CREATE that you haven't shown.
I am not doing any thing inbetween. I am just trying to create XML message from Environment tree.
Should i do this first and then put my 2nd create statement?
Quote:
-- Initialise Environment Tree to preserve XML structure
CREATE LASTCHILD OF Environment.Variables Domain 'XMLNS' Name 'DSER';
-- Copy XML structure to environment variables
SET Environment.Variables.DSER = InputRoot.XMLNS.Promise;
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum