ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » question about ASBITSTREAM

Post new topic  Reply to topic
 question about ASBITSTREAM « View previous topic :: View next topic » 
Author Message
miron
PostPosted: Thu Mar 13, 2003 9:34 am    Post subject: question about ASBITSTREAM Reply with quote

Apprentice

Joined: 27 Jun 2002
Posts: 39
Location: New York

Hello,

I am trying to save in database part of my RFH2 header data which is in XML format.
I did two different scenarios, one worked and the other not.

1. I moved my RFH2 data into Environment.Variables and then run ASBITSTREAM:
Code:

declare keydata4 BLOB;
declare keydata2 BLOB;
DECLARE options INTEGER BITOR(FolderBitStream, ValidateContent, ValidateValue);
set Environment.Variables.KEYDATA = InputRoot.MQRFH2.usr.ADAPTER.KEYDATA;
SET keydata4 = ASBITSTREAM(Environment.Variables.KEYDATA,options);
set keydata2 = substring(keydata4 from 41);

Now when I look at it in debug file it only generates 'X'
"Finished evaluating expression 'ASBITSTREAM(Environment.Variables.KEYDATA ENCODING options)' at (63, 16). The result was 'X'''. "
Looks like ASBITSTREAM does not work with Environment Variables

2. When I run code below it works fine:
Code:
DECLARE options INTEGER BITOR(FolderBitStream, ValidateContent, ValidateValue);
SET keydata4 = ASBITSTREAM(InputRoot.MQRFH2.usr.ADAPTER.KEYDATA,options);
set keydata2 = substring(keydata4 from 41);


My questions are:
- Is this correct that ASBITSTREAM does not work with Environment Variables? I read something about a bug in previous version of BITSTREAM that generates 'X' instead of whole string.
- I had to do substring of output from ASBITSTREAM to get rid of initial 40 bytes from RFH2 header. Looks like ASBITSTREAM always takes first 40 bytes of the header and then it can take only nessesary part of data.
Is this normal behaviour?

I use WMQI2.1 CSD04.

Thanks
Miron
Back to top
View user's profile Send private message
szudor
PostPosted: Fri Mar 14, 2003 8:38 am    Post subject: Reply with quote

Novice

Joined: 21 Apr 2002
Posts: 18
Location: Budapest

Hi,

From WMQI 2.1 CSD02 ESQL reference book results, that BITSTREAM function works only for Root and Body (InputRoot, InputBody). I supose, that is true for CSD04 also, including the ASBITSTREAM.
_________________
Sandor Zudor,
Certified Solution Expert/Developer
IBM WebSphere MQ & Message Broker
Back to top
View user's profile Send private message
kirani
PostPosted: Fri Mar 14, 2003 9:22 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

szudor wrote:
I supose, that is true for CSD04 also, including the ASBITSTREAM.

That's not true. This function effectively removes the limitation of the existing BITSTREAM function which can only be used on a tree produced by a parser belonging to an input node
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
migstr
PostPosted: Wed Mar 19, 2003 12:00 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Jun 2002
Posts: 34
Location: New York

Has anyone been able to get ASBITSTREAM to work on an Environment.Variables subtree or a Root.XML subtree?? If so, can you please provide an example; this is not working for us.
Back to top
View user's profile Send private message
migstr
PostPosted: Wed Mar 19, 2003 7:52 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Jun 2002
Posts: 34
Location: New York

Miron, I finally got it to work for Environment variables and RFH2 subtrees:

DECLARE options INTEGER BITOR(FolderBitStream, ValidateContent,
ValidateValue);
--Environment Variables Example
CREATE FIRSTCHILD OF Environment.Variables DOMAIN 'XML' NAME 'SAMPLE';
set Environment.Variables.SAMPLE[] = InputRoot.XML.SAMPLE[];
set myBlob = ASBITSTREAM(Environment.Variables.SAMPLE,,,,,,options);
--RFH2 Example
SET myBlob = ASBITSTREAM(InputRoot.MQRFH2.usr.ADAPTER.KEYDATA,,,,,,options);

Here is Trace output:
Environment:
'ASBITSTREAM(Environment.Variables.SAMPLE)' at (11, 14). The result was 'X'3c53414d504c453e0a2020203c5452414e53464f524d3e5452414e53464f524d3c2f5452414e53464f524d3e0a2020203c5452414e53464f524d3e5452414e53464f524d3c2f5452414e53464f524d3e0a2020203c5452414e53464f524d3e44454c4554453c2f5452414e53464f524d3e0a3c2f53414d504c453e'

RFH2:
ASBITSTREAM(InputRoot.MQRFH2.usr.ADAPTER.KEYDATA)' at (13, 14). The result was 'X'3c4b4559444154413e3c444f43554d454e544b4559533e3c4b45593e3c4b45594e414d453e696e766f6963656e756d6265723c2f4b45594e414d453e3c4b455956414c55453e3530333535353c2f4b455956414c55453e3c2f4b45593e3c2f444f43554d454e544b4559533e3c2f4b4559444154413e''.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » question about ASBITSTREAM
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.