|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Help with ASBITSTREAM. |
« View previous topic :: View next topic » |
Author |
Message
|
wmb61_user |
Posted: Thu Jul 31, 2008 8:24 am Post subject: Help with ASBITSTREAM. |
|
|
Novice
Joined: 08 May 2008 Posts: 18
|
I am trying to convert the Exceptionlist into Char so that I can send in the e-mail. I am having issues with it. Please see the code below. I get an E-mail message with the relevant informatin as soon as I comment out the exceptionChar in the concatenation. Any help is appreciated.
SET exceptionBlob = ASBITSTREAM(InputRoot.ExceptionList
ENCODING InputRoot.MQMD.Encoding
CCSID 1208);
SET exceptionChar = CAST(exceptionBlob AS CHAR CCSID 1208);
SET OutputRoot.XMLNSC.Email.Body =
'Source Queue= ' ||
InputRoot.MQMD.SourceQueue || car_ret ||
'Control Number= ' ||
CAST(InputRoot.MRM.TG2_OPS_CONTRL_NUM AS CHARACTER) || car_ret ||
'Control Sfx= ' ||
CAST(InputRoot.MRM.TG2_OPS_CONTRL_SFX AS CHARACTER)
||exceptionChar; |
|
Back to top |
|
 |
sridhsri |
Posted: Thu Jul 31, 2008 9:20 am Post subject: |
|
|
Master
Joined: 19 Jun 2008 Posts: 297
|
Exception List is not part of the Root element. Its a separate tree.
Change: SET exceptionBlob = ASBITSTREAM(InputRoot.ExceptionList
ENCODING InputRoot.MQMD.Encoding
CCSID 1208);
To: SET exceptionBlob = ASBITSTREAM(InputExceptionList
ENCODING InputRoot.MQMD.Encoding
CCSID 1208); |
|
Back to top |
|
 |
wmb61_user |
Posted: Thu Jul 31, 2008 11:25 am Post subject: |
|
|
Novice
Joined: 08 May 2008 Posts: 18
|
sridhsri,
Thanks for the response. Now I get a space when I use the function with the changes you have suggested. I know that that an exception is being generated when I debug it in my tool kit.
Thanks. |
|
Back to top |
|
 |
chrisc |
Posted: Thu Jul 31, 2008 8:08 pm Post subject: |
|
|
Voyager
Joined: 19 Mar 2006 Posts: 77
|
I think it's probably because the ExceptionList doesn't have a specific parser attached to it, so it doesn't know how to bitstream it.
Try copying it to somewhere in the Environment where you've set up a folder of domain XML(NSC), and bitstream it from there:
Code: |
DECLARE options INTEGER FolderBitStream;
DECLARE exceptionBlob BLOB;
CREATE LASTCHILD of Environment.XML DOMAIN('XML') Name 'ExceptionList';
SET Environment.XML.ExceptionList = InputExceptionList;
SET exceptionBlob = ASBITSTREAM(Environment.XML.ExceptionList OPTIONS options); |
As you can see in the code above, I think you need to set the abitstream options to FolderBitStream as well. |
|
Back to top |
|
 |
marko.pitkanen |
Posted: Thu Jul 31, 2008 10:56 pm Post subject: |
|
|
 Chevalier
Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland
|
Btw. it is quite easy to produce more human readable exception message from the ExceptionList with while loops, references, move(firstchild, nextsibling, parent), lastmove, fieldname statements and functions.
Marko |
|
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
|
|
|
|