Simple Query

Every global node exposes a SimpleQuery service, as shown in the following image.

This service allows you to retrieve sets of globals given a set of subscript conditions. A sample query is shown in the following example. It queries for the set of SP globals with three subscripts, the first subscript of which must be between 77501 and 77009 inclusive.

<tns:SimpleQuery location="mumps/EBSCHED/SP/SimpleQuery"
xmlns:tns="http://schemas.ibi.com/iwmumps/services">
<tns:Global name="SP">
  <tns:Subscript>
   <tns:conditions>
    <tns:gteq>57501</tns:gteq>
    <tns:gteq>77009</tns:gteq>
   </tns:conditions>
  </tns:Subscript>
  <tns:Subscript />
  <tns:Subscript />
 </tns:Global>
</tns:SimpleQuery>

A subscript node must be provided for each subscript in the global being queried. Empty nodes are considered wild cards. Any number of condition nodes may be specified for a subscript and are grouped as an "or" condition.

Each condition node may specify a sequence of one or more of the following operators:

All operators within a condition are grouped as an "and" operation.

Unless otherwise specified, the service treats all operands as strings and the MUMPS string comparison rules apply. If numeric comparison is desired, a subscript node may be attributed, as shown in the following example:

<tns:Subscript type="numeric">
 <tns:conditions>
  <tns:gteq>57501</tns:gteq>
  <tns:gteq>77009</tns:gteq>
 </tns:conditions>
</tns:Subscript>

As another example, the following request provides the set of SP nodes with three subscripts whose first subscript is 57501, second subscript is either 60887 or 60981, and third subscript is any value:

<tns:SimpleQuery location="mumps/EBSCHED/SP/SimpleQuery"
 xmlns:tns="http://schemas.ibi.com/iwmumps/services">
 <tns:Global name="SP">
  <tns:Subscript>
   <tns:conditions>
    <tns:gteq>57501</tns:gteq>
   </tns:conditions>
  </tns:Subscript>
  <tns:Subscript>
   <tns:conditions>
    <tns:eq>60887</tns:eq>
   </tns:conditions>
   <tns:conditions>
    <tns:eq>60981</tns:eq>
   </tns:conditions>
  </tns:Subscript>
  <tns:Subscript />
 </tns:Global>
</tns:SimpleQuery>

A fragment of the response for this request is provided below. Individual subscripts are broken out, but the value is given as raw data only since the adapter can know nothing about its format. Similarly, this service can not translate MUMPS date and time values.

<SimpleQueryResponse xmlns="http://schemas.ibi.com/iwmumps/services">
   <Global name=SP">
     <Subscript>57501</Subscript>
     <Subscript>60887</Subscript>
      <Subscript>32400</Subscript>
      <Value>A^190^5^1108OV0000*1102 ^2^SCHROELL^^^^^^88^60884,50315^35^^^^^STOVALLS^60887,30468^^^^^^511326^^^^^^^1778^^^^7</Value>
   </Global>
   <Global name="SP">
      <Subscript>57501</Subscript>
      <Subscript>60981</Subscript>
      <Subscript>38400</Subscript>
      <Value>A^190^5^1128OV0000*1122 ^2^MORROWKF^^^^^^88^60977,37502^35^^^^^STOVALLS^60981,37368^^^^^^1711762^^^^^^^4795^^^^7</Value>
   </Global>