Hi Steve,

>>>1- Can someone please explain what this "cardinality"
>>>   is all aboout (with an example).

In set theory, cardinality refers to the number of members in the set.  For
example, the cardinality of the set of people in the United States is
approximately 270,000,000. Use of this term (as opposed to "count" or some
more intuitive term) doubtless has its origins in the fact that eSQL is a
variant of SQL. When specifically applied to database theory, the
cardinality of a table refers to the number of rows (or tuples) contained
in a table. In WMQI, cardinality is used to refer to the number of elements
at a given level in the message tree. Thus you can use the CARDINALITY
function to, for example, determine how many instances of a repeating
element there are. For example, the following eSQL statement:

      set I = CARDINALITY(InputBody.data.item[]) DO

...run against a message tree generated from the following XML:

     <data>
       <item>x</item>
       <item>y</item>
       <item>z</item>
     </data>

...will count all instances of the item element and set the variable I to
3. Similarly, the following eSQL:

      WHILE I <=CARDINALITY(InputBody.data.item[]) DO
         SET OutputRoot.XML.mytag.unit[I] =  InputBody.data.item[I];
         SET I = I + 1;
      END WHILE;

...will iterate through each item element and create an output XML message
like so:

     <mytag>
       <unit>x</unit>
       <unit>y</unit>
       <unit>z</unit>
     </mytag>

>>>2- If there is a RFH in a message would the message
>>>   look like this:
>>>      MQMD-MQRFH-ApplicationData
>>>   Or, is the whole ApplicationData specified within
>>>   the name/value pairs?

Yes, the message would look like MQMD-MQRFH-ApplicationData.

>>>In this example, the MQMD.Format is set to = MQMD_RF_Header.
>>>Where would I specify the format as MQFMT_STRING for the
>>>application data? In the MQRFH.Format field? Does this format
>>>apply to both the name/value fields and ApplicationData?

You would specify MQFMT_STRING in the MQRFH.Format field to indicate that
the application data is all string (character) data. It would only apply to
the ApplicationData, as I believe the name/value pairs that make up the RFH
must be strings.

Note that with WMQI, you do not need to use the RFH header, as the values
it contains can be specified as properties of the MQInput node or a
ResetContentDescriptor node of a message flow. An RFH header can be used,
but this is not required.

Regards,

Christopher Frank
Sr. I/T Specialist - IBM Software Group
IBM Certified Solutions Expert - Websphere MQ & MQ Integrator
--------------------------------------------
Phone: 612-397-5532 (t/l 653-5532) mobile: 612-669-3008
e-mail: [EMAIL PROTECTED]

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive

Reply via email to