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 » MRM Field Size

Post new topic  Reply to topic
 MRM Field Size « View previous topic :: View next topic » 
Author Message
wbiman
PostPosted: Mon Aug 16, 2004 6:09 am    Post subject: MRM Field Size Reply with quote

Voyager

Joined: 13 Jul 2004
Posts: 84

Hi Friends,

I have fixed length MRM-CWF Message Set with 10 fields. Is there way/function I can use to get field length/size using ESQL.

Please help

-WBI
Back to top
View user's profile Send private message
Lisa
PostPosted: Mon Aug 16, 2004 6:21 am    Post subject: Reply with quote

Master

Joined: 07 Jun 2002
Posts: 287
Location: NJ

Yes, use the length function

Set mylength = length(field1);


Last edited by Lisa on Tue Aug 17, 2004 9:28 am; edited 4 times in total
Back to top
View user's profile Send private message Send e-mail
wooda
PostPosted: Mon Aug 16, 2004 7:35 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2003
Posts: 265
Location: UK

Hi wbiman,

If you mean can you get the length you have defined in the message set in your ESQL then the answer is no.
Because by the time you are examining the tree in ESQL the length may well have changed from that defined in the message set. This is due to removal of padding on character fields, conversion of encoded numeric fields and removal of extraneous digits in numeric fields.
Back to top
View user's profile Send private message
wbiman
PostPosted: Tue Aug 17, 2004 5:56 am    Post subject: Please help Reply with quote

Voyager

Joined: 13 Jul 2004
Posts: 84

Hi,

Here's the exact situation. I am trying to convert input data that in XML format to fixed length MRM format. So when I try to map XML fields to MRM Fixed length messageset fields I am getting errors, I can understand its due to XML TAGS/value is greator or lesser that fixed length fields.

So i thought of truncating the XML TAG values to required fixed length. inorder to do that I don't want to hardcode the length/size of fixed length fields of MRM message set.

So I am looking for way I can get the field length/size in ESQL? not the value size........or there's any betterway to do this?

Please help
WBI
Back to top
View user's profile Send private message
Lisa
PostPosted: Tue Aug 17, 2004 9:20 am    Post subject: Lenght Reply with quote

Master

Joined: 07 Jun 2002
Posts: 287
Location: NJ

Yes, if you would like to find the length of your data, use the length function

Set mylength = length(field1);

Is this what your looking for?
Back to top
View user's profile Send private message Send e-mail
wooda
PostPosted: Tue Aug 17, 2004 11:55 pm    Post subject: Reply with quote

Master

Joined: 21 Nov 2003
Posts: 265
Location: UK

Ok you last post only added to the confusion. Not sure what you meant by the length of XML TAGS. Surely the length of the tag doesn't matter as it is removed by the XML parser.

Anyway. Here is what I think you mean. Please indicate if this is what you mean :


Input XML

eg.
<msg><field1>somedatafjkdfjkdjf</field1><field2>more</field2></msg>

Output MRM (CWF)

eg. two eight character fields
somedatamoredata

Problem is that the data in XML can be too long for the fixedlength field or too short.


Answer :

If the data is too short this is not a problem. simply use CWF padding to pad to the required length.

If the data is too long then you will have to truncate it yourself in ESQL. You will not be able to query the Length defined in the msgset from ESQL. So you will have to hardcode this into the ESQL.


If this is not what you meant then please give us an example to illustrate what you want. Include an example of the input and the desired output and what problems you are hitting.
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 » MRM Field Size
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.