Author |
Message
|
mayur2378 |
Posted: Mon Aug 22, 2005 12:59 pm Post subject: Issue with AsBitstream |
|
|
Apprentice
Joined: 26 May 2004 Posts: 47
|
Heres a Sample Code
Code: |
Set Environment.Variables.MBI_SUBSCRIBER.IB_RECORD_ID='IB';
Set Environment.Variables.MBI_SUBSCRIBER.IB_Employee_ID='ABC';
Set OutputRoot.MRM.TEST=Cast (ASBISTREAM(Environment.Variables.MBI_Subscriber) as char ccsid 1208 ENCODING MQENC_NATIVE);
|
The Result i get is a Blank for the OutPutRoot.MRM.TEST. I am kinda confused here and dont know where i am goin wrong.
Any Inputs on this !!! |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Aug 22, 2005 1:03 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Correct me if I'm wrong, but Environment.Variables.MBI_SUBSCRIBER is a different field than Environment.Variables.MBI_Subscriber. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mayur2378 |
Posted: Mon Aug 22, 2005 1:06 pm Post subject: |
|
|
Apprentice
Joined: 26 May 2004 Posts: 47
|
Quote: |
Correct me if I'm wrong, but Environment.Variables.MBI_SUBSCRIBER is a different field than Environment.Variables.MBI_Subscriber
|
That was a Typo. Appologise for that. It is Environment.Variables.MBI_SUBSCRIBER |
|
Back to top |
|
 |
mgk |
Posted: Mon Aug 22, 2005 2:08 pm Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Hi,
Your ASBISTREAM(Environment.Variables.MBI_Subscriber) will return NULL because the element MBI_Subscriber does not belong to a real parser (only a root parser) and so will not generate a bitstream. I believe you need to use CREATE with a DOMAIN clause to create a parser for your fields to belong to before you can ASBITSTREAM them. In the case you posted you could try a CASTing to a BLOB with a CCSID instead of ASBITSTREAM, although I guess your real code would be more complicated .
Regards. _________________ 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: Mon Aug 22, 2005 5:32 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
This might throw some more light on your problem.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
mayur2378 |
Posted: Tue Aug 23, 2005 10:59 am Post subject: |
|
|
Apprentice
Joined: 26 May 2004 Posts: 47
|
Sorry for the late response,
Thankz Eddie, mgk. Your inputs helped a lot.
Mayur |
|
Back to top |
|
 |
|