|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Unable to ASBITSTREAM Enviroment Tree |
« View previous topic :: View next topic » |
Author |
Message
|
EddieA |
Posted: Tue Dec 14, 2004 3:05 pm Post subject: Unable to ASBITSTREAM Enviroment Tree |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Hi. This one is driving me nuts. Hopefully another set of eyes can spot my (obviously) stupid mistake.
I'm trying to save off some data I've built in the Environment. Here's the Trace ouput:
Code: |
Environment:
(
(0x01000000):Variables = (
(0x03000000):MessageName = 'InventoryCheckRequest'
(0x03000000):ConceptCode = 'HE'
(0x01000000):SETTINGS = (
(0x03000000):MessageName = 'InventoryCheckRequest'
(0x03000000):ConceptCode = 'ALL'
(0x03000000):MsgType = 1
(0x03000000):MsgTransport = 'JMS '
(0x03000000):XMLVersion = '10'
(0x03000000):QueueName = 'QC.RCOM.REQ'
(0x03000000):MsgFormat = 'XML '
(0x03000000):MaxMessageLength = '100000'
)
)
) |
Here's the code snippet, that matches as closely as possible, the example in the manual:
Code: |
DECLARE options INTEGER BITOR(FolderBitStream, ValidateContent, ValidateValue);
declare BlobIt BLOB;
set BlobIt=ASBITSTREAM(Environment.Variables OPTIONS options CCSID 1208); |
And here's the relevent debug trace output:
Quote: |
Executing statement 'DECLARE options INTEGER BITOR(FolderBitStream, ValidateContent, ValidateValue);' at (.WSI_eCommerceHub_GetSettings.Main, 133.4).
Evaluating expression 'BITOR(FolderBitStream, ValidateContent, ValidateValue)' at (.WSI_eCommerceHub_GetSettings.Main, 133.29).
Evaluating expression 'FolderBitStream' at (.WSI_eCommerceHub_GetSettings.Main, 133.34).
Evaluating expression 'ValidateContent' at (.WSI_eCommerceHub_GetSettings.Main, 133.51).
Evaluating expression 'ValidateValue' at (.WSI_eCommerceHub_GetSettings.Main, 133.69).
Finished evaluating expression 'BITOR(FolderBitStream, ValidateContent, ValidateValue)' at (.WSI_eCommerceHub_GetSettings.Main, 133.29). This resolved to 'BITOR(4294967296, 4096, 8192)'. The result was '4294979584'.
Executing statement 'DECLARE BlobIt BLOB;' at (.WSI_eCommerceHub_GetSettings.Main, 134.4).
Executing statement 'SET BlobIt = ASBITSTREAM(Environment.Variables ENCODING 1208 FORMAT options);' at (.WSI_eCommerceHub_GetSettings.Main, 135.4).
Evaluating expression 'ASBITSTREAM(Environment.Variables ENCODING 1208 FORMAT options)' at (.WSI_eCommerceHub_GetSettings.Main, 135.15).
Evaluating expression 'options' at (.WSI_eCommerceHub_GetSettings.Main, 135.57).
Finished evaluating expression 'ASBITSTREAM(Environment.Variables ENCODING 1208 FORMAT options)' at (.WSI_eCommerceHub_GetSettings.Main, 135.15). The result was 'X'''. |
I've tried with RootBitStream instead of FolderBitStream. I've tried without the CCSID. I've tried putting the *BitStream Options directly in the ASBITSTREAM. I've tried without any Options. I've tried with just Environment. I've tried Enmvironment.Varaibles.SETTINGS. Always with the same result. Nadda.
This is a v5 setup, with FP4 applied.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
EddieA |
Posted: Tue Dec 14, 2004 3:16 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Hmmmmmm:
Quote: |
ASBITSTREAM(Environment.Variables OPTIONS options CCSID 1208); |
Quote: |
Executing statement 'SET BlobIt = ASBITSTREAM(Environment.Variables ENCODING 1208 FORMAT options);' |
**Update** Because of the above, I tried entering the 'parameters' in the alternate way, as a comma seperated list. If you put 2 commas together, to signify an missing value, ',,', it gets flagged as a Syntax Error. Looks like ASBITSTREAM is well and truely broken at v5/FP4.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Dec 14, 2004 4:17 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
PM me your code, and I'll play with it. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mgk |
Posted: Wed Dec 15, 2004 4:06 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Hi Eddie,
There are several things here.
I have looked at the code and the tracing for this function is broken, as you noticed, however the code that actually does the work is not. Please raise a PMR for this.
In addition, the tooling does not accept the empty comma seperated list version of the syntax, and you noticed, but the runtime will accept it (but you cannot deploy syntax using it). Please raise a PMR for this.
I believe the actual problem you are having is because Environment.Variables does not have a parser, (it belongs to a root parser) so it has no way of generating a bitstream. To fix this, create the Variables folder with a parser (using CREATE with a DOMAIN clause) e.g. XML or XMLNS. This way the parser will be called to generate a bitstream for you.
Regards,
MGK _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Dec 15, 2004 7:10 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I'll confirm that adding
Code: |
Create FIRSTCHILD of Environment DOMAIN 'XML' Name 'Variables'; |
before the first assignment to Environment.Variables does fix the missing bitstream problem.
This code
Code: |
Create FIRSTCHILD of Environment DOMAIN 'XML' Name 'Variables';
set Environment.Variables.MessageName = 'InventoryCheckRequest';
set Environment.Variables.ConceptCode = 'HE';
set Environment.Variables.SETTINGS.MessageName = 'InventoryCheckRequest';
set Environment.Variables.SETTINGS.ConceptCode = 'ALL';
set Environment.Variables.SETTINGS.MsgType = 1;
set Environment.Variables.SETTINGS.MsgTransport = 'JMS ';
set Environment.Variables.SETTINGS.XMLVersion = '10';
set Environment.Variables.SETTINGS.QueueName = 'QC.RCOM.REQ';
set Environment.Variables.SETTINGS.MsgFormat = 'XML ';
set Environment.Variables.SETTINGS.MaxMessageLength = '100000';
DECLARE options INTEGER BITOR(FolderBitStream, ValidateContent, ValidateValue);
declare BlobIt BLOB ASBITSTREAM(Environment.Variables OPTIONS options CCSID InputRoot.Properties.CodedCharSetId);
Set Environment.Variables.BLOBIT = BlobIt; |
Gives me this trace for Environment
Code: |
(
(0x01000010):Variables = (
(0x01000000):MessageName = (
(0x02000000): = 'InventoryCheckRequest'
)
(0x01000000):ConceptCode = (
(0x02000000): = 'HE'
)
(0x01000000):SETTINGS = (
(0x01000000):MessageName = (
(0x02000000): = 'InventoryCheckRequest'
)
(0x01000000):ConceptCode = (
(0x02000000): = 'ALL'
)
(0x01000000):MsgType = (
(0x02000000): = 1
)
(0x01000000):MsgTransport = (
(0x02000000): = 'JMS '
)
(0x01000000):XMLVersion = (
(0x02000000): = '10'
)
(0x01000000):QueueName = (
(0x02000000): = 'QC.RCOM.REQ'
)
(0x01000000):MsgFormat = (
(0x02000000): = 'XML '
)
(0x01000000):MaxMessageLength = (
(0x02000000): = '100000'
)
)
(0x01000000):BLOBIT = (
(0x02000000): = X'3c5661726961626c65733e3c4d6573736167654e616d653e496e7
6656e746f7279436865636b526571756573743c2f4d6573736167654
e616d653e3c436f6e63657074436f6465
3e48453c2f436f6e63657074436f64653e3c53455454494e47533e3c4
d6573736167654e616d653e496e76656e746f7279436865636b526571
756573743c2f4d6573736167654e61
6d653e3c436f6e63657074436f64653e414c4c3c2f436f6e63657074436
f64653e3c4d7367547970653e313c2f4d7367547970653e3c4d736754
72616e73706f72743e4a4d532020
3c2f4d73675472616e73706f72743e3c584d4c56657273696f6e3e3
1303c2f584d4c56657273696f6e3e3c51756575654e616d653e51432e
52434f4d2e5245513c2f51756575654e
616d653e3c4d7367466f726d61743e584d4c20203c2f4d7367466f726d6
1743e3c4d61784d6573736167654c656e6774683e3130303030303
c2f4d61784d6573736167654c656
e6774683e3c2f53455454494e47533e3c2f5661726961626c65733e'
)
)
)
|
I manually line broke the BLOB data, to prevent massively wide post.
But I think this may cause Eddie some issues... He's not looking to have XML tags mixed in with his data, if I understand things. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mgk |
Posted: Wed Dec 15, 2004 7:49 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Hi,
The parser does not have to be XML. It could be a modelled CWF format (MRM) parser for example...
I guess I would like to know what Eddie is trying to do here before I suggest anything else
Cheers, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
EddieA |
Posted: Wed Dec 15, 2004 10:18 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
I guess I would like to know what Eddie is trying to do here before I suggest anything else |
I have a DB that contains a routing table. For each message, I need to grab information from it to process the message. But, in order to cut down on the DB reads, I am using the Cache Node SupportPac to hold the data in memory once it has been read once. Very simpified, this is:
Code: |
Set Cache Key from message
Read Cache into Environment
If Environment = null then
Read DB into Enviroment using key
Write Cache
End If
|
The reason for the ASBITSTREAM is because the Cache Node will only store a String, not a tree. So the code actually becomes:
Code: |
Set Cache Key from message
Read Cache into Variable
If Variable = null then
Read DB into Environment using key
ASBITSTREAM Environment into Blob
CAST Blob to String
Write Cache from String
else
CREATE Environment PARSE(Variable)
End If
|
So, the embedded Tags are not a problem. In fact I need them.
Now, my only problem is going through the rest of the code to see where/how MsgType is used, because under the old method the value was an Integer. Now, it's become Character.
Ah, the joys of inherited code.
Thanks again guys. MGK, next time I'm anywhere close to the Dolphin, I owe you a beer. Same for you Jeff, especially if I ever get a gig around your part of the counntry.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|