Author |
Message
|
wbiman |
Posted: Tue Aug 17, 2004 8:00 am Post subject: Please help- MQSI2.1 |
|
|
Voyager
Joined: 13 Jul 2004 Posts: 84
|
Hi Friends,
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 |
|
 |
Missam |
Posted: Tue Aug 17, 2004 8:05 am Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
Quote: |
inorder to do that I don't want to hardcode the length/size of fixed length fields of MRM message set |
If you don't want to specify length of elements in message,then what's the meaning of Fixed Length MRM.
you need to give up some data by truncating or change your Structure from Fixed Length to TDS |
|
Back to top |
|
 |
wbiman |
Posted: Tue Aug 17, 2004 8:11 am Post subject: fixed length field |
|
|
Voyager
Joined: 13 Jul 2004 Posts: 84
|
Thats correct , but I can't map directly to fixed length field messageset.
So I need some ESQL function that returns the length/size of Fixed length MRM messageset. inother words if I have defined message set with field size 10. so in my compute node I want to use some function to get that element size/length....so that i will use truncate funtions on that.
but before that I am looking for some ESQL function that return that length of fixed length field.
Please help |
|
Back to top |
|
 |
Missam |
Posted: Tue Aug 17, 2004 8:54 am Post subject: |
|
|
Chevalier
Joined: 16 Oct 2003 Posts: 424
|
Quote: |
but I can't map directly to fixed length field messageset |
Why not...?If you are creating the message set or if it is already defined.
you can know the length of the elements from property sheets.
why you want to use a function to get the length of element which is already fixed
Quote: |
inother words if I have defined message set with field size 10. so in my compute node I want to use some function to get that element size/length....so that i will use truncate funtions on that |
if you now the lenght of element is 10 why another function to get the length |
|
Back to top |
|
 |
wbiman |
Posted: Tue Aug 17, 2004 9:33 am Post subject: not want to hardcode those values |
|
|
Voyager
Joined: 13 Jul 2004 Posts: 84
|
I don't want to hard code those values........
Thanks
WBI |
|
Back to top |
|
 |
kirani |
Posted: Sat Aug 21, 2004 2:09 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
WBI,
Currently there is no function in ESQL that will return you the length (defined in MRM) of MRM element. You can either store the length of each field in DB table or hardcode the lengths in ESQL code. _________________ 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 |
|
 |
shanson |
Posted: Mon Aug 23, 2004 3:12 am Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
There is no API to access MRM dictionary information from ESQL. |
|
Back to top |
|
 |
chanduy9 |
Posted: Mon Aug 23, 2004 6:19 am Post subject: |
|
|
Disciple
Joined: 28 Nov 2001 Posts: 177 Location: USA
|
Hi,
When you created the msgset...you should know the lenght of the each and every element (for Fixlength)..when you have those values..why do you want to call a function to find the length of the field.
Thanks,
Chandra. |
|
Back to top |
|
 |
shanson |
Posted: Mon Aug 23, 2004 7:06 am Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
I think the requirement is to decouple the ESQL and the message set, so that a change to the message set does not require a corresponding change to the ESQL.
I suspect the problem comes about partly because of some historic checking performed by the MRM. Prior to the introduction of runtime validation in V2.1, the MRM had length checking for fixed length fields such that if a value exceeded the defined length an error was thrown. For compatibility purposes, this checking was both retained and left outside of the validation controls (ie, you can't switch it off) when validation was added.
So if you want to write a transform that populates a message of fixed length fields from varying length data, the MRM will pad short values ok but will error values that are too long. Forcing you to have knowledge of the length in ESQL, hence this append. |
|
Back to top |
|
 |
kirani |
Posted: Mon Aug 23, 2004 8:48 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Steve,
Is there a plan to provide such functionality in future CSD/Release of WBIMB? _________________ 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 |
|
 |
shanson |
Posted: Tue Aug 24, 2004 12:31 am Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
|
Back to top |
|
 |
akir |
Posted: Tue Apr 01, 2008 6:33 am Post subject: |
|
|
 Acolyte
Joined: 28 Jun 2007 Posts: 51
|
shanson wrote: |
There is no API to access MRM dictionary information from ESQL. |
Is there any API for it now.Now that times have changed.
I am using Broker Toolkit version 6.0.2 with runtime as 6.0.0.3. _________________ Thanks and Regards,
Akir
Tell everyone what you want to do and someone will want to help you do it.-W. Clement Stone |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Apr 01, 2008 6:58 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
No.
Don't double-post.
 _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|