Author |
Message
|
pfaulkner |
Posted: Tue Nov 11, 2003 11:55 am Post subject: Converting an CWF message to BLOB |
|
|
Master
Joined: 18 Mar 2002 Posts: 241 Location: Colorado, USA
|
I have a message in CWF but I need to remove several fields from the message before appending the message to another part of my message and then write the message out.
If I SET each field I want to remove to NULL now my message doesn't match the CWF that is using so when I use BITSTREAM(InputBody) during the code to merge the 2 portions of my msg it fails.
I assume after removing the fields I need to convert my msg to a BLOB format so that it is no longer parsed against the CWF.
So, how I convert a CWF to BLOB? |
|
Back to top |
|
 |
kimbert |
Posted: Wed Nov 12, 2003 1:36 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Well, converting a message tree to a BLOB is exactly what the CWF format does...
You need to define another message (e.g. 'modifiedMsg') which is the same as the input message, but does not contain the fields which you are removing. When you use the BITSTREAM function, use 'modifiedMsg' and you will not get any errors about missing data. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Nov 12, 2003 7:37 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Kimbert is correct about defining a new message that doesn't contain the fields you don't want.
But if you're using 2.1 or later, you should be using the ASBITSTREAM function (documented in the readme as of CSD03) instead of the BITSTREAM function. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
pfaulkner |
Posted: Wed Nov 12, 2003 8:02 am Post subject: |
|
|
Master
Joined: 18 Mar 2002 Posts: 241 Location: Colorado, USA
|
Yeah I thought of that but was hoping to get around it somehow and have to build a 2nd message. My message has over 1500 fields and the config mgr is already having a hard time keeping up whenever I make changes. Thought adding another big message before I get to upgrade my PC might kill it. |
|
Back to top |
|
 |
kimbert |
Posted: Fri Nov 14, 2003 6:30 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You might consider an upgrade to v5.0 CSD2 if you're struggling with the 2.1 Control Center. Version 5.0 stores all development artifacts as files (i.e. not in a database), and one benefit is that it tends to perform rather better on big message sets. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Nov 14, 2003 6:56 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If you don't want to add another message, then you should convert the CWF to BLOB before you remove your fields.
You can use the SUBSTRING function on BLOB fields. Converting from CWF to BLOB is relatively straight forward. Assign OutputRoot.BLOB.BLOB to the results of an ASBITSTREAM on the CWF message tree, and then work with that. You can either put in an RCD node before your output node, or you can set the Properties of the message to indicate a BLOB message. (MessageSet, MessageType, Message Format). _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
pfaulkner |
Posted: Fri Nov 14, 2003 7:09 am Post subject: |
|
|
Master
Joined: 18 Mar 2002 Posts: 241 Location: Colorado, USA
|
Jeff,
thanks for the reply. If I convert to BLOB, I assume I would need to know the location of of the fields within the message to remove them with substring? Problem the message contains several variable length tables so I would have a difficult time figuring out where my fields are. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Nov 14, 2003 8:48 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
pfaulkner wrote: |
Jeff,
thanks for the reply. If I convert to BLOB, I assume I would need to know the location of of the fields within the message to remove them with substring? Problem the message contains several variable length tables so I would have a difficult time figuring out where my fields are. |
Yep, that sounds like a problem.
You said you were having difficulties working with your message set at it's current size, and didn't want to try and work with an ADDITIONAL copy, because of the size and the capabilities of your workstation.
Have you done things to increase the amount of memory available to your Control Center?
I upped the JVM heap sizes (using -mx and -ms) on my control center to 800MB max, with 600MB taken normally, and that helped a lot when working with large (for me) message sets.
Or are you running out of real, physical memory on your development workstation? If so, well, RAM is cheap . _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
pfaulkner |
Posted: Fri Nov 14, 2003 9:21 am Post subject: |
|
|
Master
Joined: 18 Mar 2002 Posts: 241 Location: Colorado, USA
|
I changed the mx option to 800 so we'll see if it helps. So far so good though, I expanded a lot of message and no problems
What is the ms option? Didn't see either documented anywhere!
Also, I seem to be getting a lot of timeout's while trying to look at large messages in the control center. Have you seen similar problems? |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Nov 14, 2003 10:20 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
pfaulkner wrote: |
I changed the mx option to 800 so we'll see if it helps. So far so good though, I expanded a lot of message and no problems
What is the ms option? Didn't see either documented anywhere!
Also, I seem to be getting a lot of timeout's while trying to look at large messages in the control center. Have you seen similar problems? |
-mx and -ms are "extensions" to the standard JVM options. They're documented somewhere on Sun's website. It's been a while since I looked, so I don't remember where. They're also sometimes used as -xmx and -xms, I think - but not with the version of the JVM that wmqi uses.
-MX is the maximum allowed heap size for the JVM (JVM can't allocate any more than that amount of memory), and -MS is the minimum heap size (JVM will automatically allocate that much memory).
There could be a ton of reasons for the timeouts. Slow network connections, busy config mgr or broker, etc. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|