Author |
Message
|
bijesh |
Posted: Tue Feb 06, 2007 5:43 pm Post subject: Creating a message set from Compute node |
|
|
Acolyte
Joined: 30 Jan 2007 Posts: 66
|
Hi All,
Do you have any idea on making use of message set from a Compute node for a bitstream which is not an XML.
Regards,
Bijesh |
|
Back to top |
|
 |
MSAT |
Posted: Tue Feb 06, 2007 11:56 pm Post subject: |
|
|
Acolyte
Joined: 17 Aug 2005 Posts: 62 Location: Bengalooru
|
Hi Bijesh,
Can you explain what exactly you wanted to know ?
If I am correct you would like to convert a data in to Bitstream. Where the message set is not in the XML domain.
I think you can use the BITSTREAM function for this to convert the message into BIT stream.
Bye
SAT |
|
Back to top |
|
 |
kimbert |
Posted: Wed Feb 07, 2007 1:08 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I think you can use the BITSTREAM function |
No, do NOT do that. BITSTREAM has been deprecated for several releases now. Use ASBITSTREAM ( assuming that you have guessed bijesh's requirements correctly ). |
|
Back to top |
|
 |
bijesh |
Posted: Wed Feb 07, 2007 1:30 am Post subject: |
|
|
Acolyte
Joined: 30 Jan 2007 Posts: 66
|
Hi,
The requirement is, I need to make use of a message set from a compute node to parse the contents of a String. The string is not an XML document.
will the ResetContentDescriptor node help me in doing this? |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Feb 07, 2007 2:21 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
ResetContentDescriptor will change the values in the Properties tree to indicate that the message body is described by a different set of values than previously. This, in turn, will cause the message data to be parsed using the new properties THE NEXT TIME parsing occurs.
That is, RCD doesn't cause parsing.
You can also use Create Field... Parse. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
bijesh |
Posted: Wed Feb 07, 2007 2:43 am Post subject: |
|
|
Acolyte
Joined: 30 Jan 2007 Posts: 66
|
Hi,
I've been trying to use Create Field ..Parse.
But since the parameter is a bitstream in XML, I was not getting the result as expected.
First I've used my String to consturct a bitstream using ASBITSTREAM(). this resluted in error
After that I've used CREATE LASTCHILD OF OutputRoot DOMAIN('MRM')
PARSE(inBitStream, inEncoding, inCCSID, 'DP3UK14002001',
'TestCase', 'CWF1', options);
But since the bitstream is invalid this was failing.
Please let me know of any suggestion. Please correct me if I've done anything wrong in the above statement as well.
Will you be able to tell me how the inBitStream should be? |
|
Back to top |
|
 |
kimbert |
Posted: Wed Feb 07, 2007 4:00 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You are attempting to parse an XML bitstream as CWF.
- Make sure that your message set contains an XML physical format with name 'XML1'.
- Change 'CWF1' to 'XML1' in your CREATE LASTHCHILD...PARSE statement. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Feb 07, 2007 4:39 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It's possible, Kimbert, that bijesh is trying to parse a CWF bitstream that's been stored in the value of an XML element.
Switching the domain to MRM-XML wouldn't solve that.
My guess is that the CWF data is badly formed. Or the model doesn't match the data. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Feb 07, 2007 6:59 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
It's possible, Kimbert, that bijesh is trying to parse a CWF bitstream that's been stored in the value of an XML element. |
hi bijesh,
Can you post the error message which is being issued when you execute CREATE...PARSE. Thanks. |
|
Back to top |
|
 |
bijesh |
Posted: Wed Feb 07, 2007 7:46 pm Post subject: |
|
|
Acolyte
Joined: 30 Jan 2007 Posts: 66
|
SET STR='00ErrorDescription is described';
I want to parse the data in this string STR using the message set identified by HDLGS0O002001.
How can we get an XML bit stream from this. So that I can make use of the below clause.
CREATE LASTCHILD OF OutputRoot DOMAIN('MRM') PARSE(inBitStream, 546,437, 'HDLGS0O002001','GRS4200', 'CWF1');
There is no problem with the message set as I've already tested the message set with the same message using MQInput node with message set->Compute->MQOutputnode. It was getting parsed successfully.
The error was Invalid Bitstream. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Feb 08, 2007 2:26 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The bitstream you pass into Create Field has to look like your STR variable.
It can't be XML data if you're using a CWF message set.
If you have STR stored in an XML Element, you could do something like
Code: |
CREATE LASTCHILD OF OutputRoot DOMAIN('MRM') PARSE(InputRoot.XMLNS.Data.STRField,InputRoot.Properties.Encoding,InputRoot.Propreties.CodedCharSetId, 'HDLGS0O002001','GRS4200', 'CWF1'); |
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
bijesh |
Posted: Thu Feb 08, 2007 4:58 am Post subject: |
|
|
Acolyte
Joined: 30 Jan 2007 Posts: 66
|
Thanks a lot jefflowrey..That works...
Thanks to others too.. |
|
Back to top |
|
 |
|