Author |
Message
|
maxis |
Posted: Wed Jan 22, 2003 12:23 pm Post subject: Compound Type |
|
|
Centurion
Joined: 25 Jun 2002 Posts: 144
|
hello all,
As we know its possible to define repeating character for an element ( or Compound Type ) in MRM - through CWF -> RepeatCount. WMQI expects us to define the value at build time, which is fine.
Is there a way to find this value at run-time - ie in compound type using ESQL ?
Will some tell me how to do this ?
thx
M |
|
Back to top |
|
 |
TonyD |
Posted: Wed Jan 22, 2003 1:14 pm Post subject: |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
You may be able to use the CARDINALITY function to determine the number of occurences of the repeating element in the incoming structure. |
|
Back to top |
|
 |
lillo |
Posted: Thu Jan 23, 2003 12:02 am Post subject: |
|
|
Master
Joined: 11 Sep 2001 Posts: 224
|
It is also possible to have the repeting counter inside the message. The do this just change in the CWF tab the Repeat Count Type from "Count" to "Value of" and select the field to the dependency.
This is usefull when parsing a MRM message to convert it to XML.
I hope this help you.
Cheers, _________________ Lillo
IBM Certified Specialist - WebSphere MQ |
|
Back to top |
|
 |
Yanghui |
Posted: Thu Jan 23, 2003 12:48 am Post subject: |
|
|
Disciple
Joined: 08 May 2002 Posts: 151 Location: Dublin, Ireland
|
I am using WMQI2.1 + CSD2 on win2k. I found that even after I checked out both compound type and its element, the two properties in the CWF tab of the element, Repeat Count Type and Repeat Count Value of, are not active and none-changeable. How can I make them active? Thanks in advance.
-Yanghui |
|
Back to top |
|
 |
lillo |
Posted: Thu Jan 23, 2003 3:17 am Post subject: |
|
|
Master
Joined: 11 Sep 2001 Posts: 224
|
Follow this steps:
Unlock the type in the type subfolder.
Select the element you to have the dependency on other element
In the connection tab, select Repeat Yes and click the apply button on the botton.
Move to your CWF tab. Now you could change your Repeat Count Type to Value of
Select on the Repeat Count Value Of the field name. On the list you could only find the integer fields which are before the actual field.
Chech in the type.
That´s all you have to do.
Cheers, _________________ Lillo
IBM Certified Specialist - WebSphere MQ |
|
Back to top |
|
 |
Yanghui |
Posted: Thu Jan 23, 2003 8:53 am Post subject: |
|
|
Disciple
Joined: 08 May 2002 Posts: 151 Location: Dublin, Ireland
|
Thanks a lot but ...
I did exact same as the steps you listed here but the two fields are just not active for me.
-Yanghui |
|
Back to top |
|
 |
maxis |
Posted: Thu Jan 23, 2003 8:56 am Post subject: |
|
|
Centurion
Joined: 25 Jun 2002 Posts: 144
|
thanks guys for your answers,
Lillo what u said is very much possible and infact its very helpful, when its repeat is variable.
In some couple of cases repeating value is known (999) - and client doesnt accept another field - record count. So I used MRM feature to mention the repeating counter.
So is there way to find-out this fixed value which is defined at MRM - CWF level, at the run time ? Checking for the cardinality gives value for particular tree not the value defined in MRM ..
any suggestions Grand Masters ?
thanks
M |
|
Back to top |
|
 |
kirani |
Posted: Thu Jan 23, 2003 6:32 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
pvmk wrote: |
In some couple of cases repeating value is known (999) - and client doesnt accept another field - record count. So I used MRM feature to mention the repeating counter.
|
If the repeating value is known and fixed, you can tell the MRM taht it's fixed number of repeat. This is similar to OCCURS N.
pvmk wrote: |
So is there way to find-out this fixed value which is defined at MRM - CWF level, at the run time ? Checking for the cardinality gives value for particular tree not the value defined in MRM ..
|
Are you asking whether you can change fixed number of repeats (Repeat count value in CWF tab) at runtime? The answer is NO.
In situations where the repeat is variable and client doesn't want OCCURS value (counter) in the output message, I first transform the message into required MRM-CWF format and then transform it back to BLOB, then I remove the COUNTER field from the message body using some ESQL code before putting it on the queue. _________________ 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 |
|
 |
|