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 » Cast Blob from Array

Post new topic  Reply to topic
 Cast Blob from Array « View previous topic :: View next topic » 
Author Message
giorginus80
PostPosted: Wed Dec 17, 2008 9:19 am    Post subject: Cast Blob from Array Reply with quote

Centurion

Joined: 08 Jul 2008
Posts: 124
Location: Rome, Italy

Hi,
I have an xml like this:
Code:

<FIELDS>
    <FIELD>1</FIELD>
    <FIELD>2</FIELD>
    <FIELD>3</FIELD>
    <FIELD>4</FIELD>
    <FIELD>5</FIELD>
    <FIELD>6</FIELD>
</FIELDS>


I need to convert to a Blob the FIELD without including FIELDS.
I tried:
Code:

DECLARE folderBlob BLOB ASBITSTREAM(Environment.myData.XML.FIELDS,
               InputRoot.Properties.Encoding,
               InputRoot.Properties.CodedCharSetId,
               '','','',FolderBitStream);

but in this case the FIELDS is included, I tried Environment.myData.XML.FIELDS.FIELD[] but it doesn't deploy in this case.
Which way is better?
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Dec 17, 2008 2:03 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Remember this:
- message flows operate on the logical message structure
- message sets describe the input and output physical format(s) of the messages
You should try to avoid putting into your message flow any information about the physical format of the message.

You are trying to convert between your input physical format ( XML ) and your output physical format (fixed-length string). You should:
- Use XMLNSC as your input domain. XMLNSC does not require a message set, but it is best practice to create one anyway, unless your input message structure is trivial. If the input logical structure is the same as the output logical structure, you can reuse the output message set.
- Create a message set for your output format. Add a TDS physical format. The Data Element Separation will default to 'Fixed Length' which is what you need. Set the length field on each element in the message definition.
- In your message flow, copy InputRoot.XMLNSC.FIELDS to OutputRoot.MRM. Set OutputRoot.Properties.MessageSet to the name of your output message set. Set OutputRoot.Properties.MessageType to the name of the message definition. Set OutputRoot.Properties.MessageFormat to the name of your TDS physical format.

Hopefully, you now realise why your previous attempts did not work. If not, please take time to read the docs and work that out.
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 » Cast Blob from Array
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.