The client system reads the Pmap to identify required field-level decoding.
In this example light grey values indicate an unused bit.
Step 1. Extract Pmap1 from data. Pmap1 is the top-level Pmap that contains the Pmap bits for all fields requiring a Pmap bit in the message.
• The first bit in Pmap1 after the stop bit (in bold) is assigned to the Template ID, which always has a bit. The bit is turned on indicating that the Template ID is present in the encoded message and that the corresponding template must be loaded.
• The first field in the template is the MessageType, defined as a mandatory field using a Constant operator with a value of “X” retrieved from the template and therefore does not have a bit.
• The next field in the template is NoMDEntries. The length specified in the sequence determines the number of repeating groups in the message. This field does not have a bit since the field is mandatory and does not have an operator.
• The remaining bits in Pmap1 are defaulted to 0 but are not referenced by the decoding process; at this point, the Header fields have been decoded.
Step 2. Extract Pmap2 from data. Pmap2 represents the first repeating group and contains trade-related fields.
• The next field in the template is MDUpdateAction. By definition, this field requires a bit in the Pmap since it uses the Copy field operator. In this example, the bit is set to 0 indicating that no data is present and that the value must be derived from the initial value.
• The next field in the template is MDEntryType, which is a Copy field. The Pmap set to ‘1’ indicates an encoded value present in the field.
• The decoding process continues using the template and Pmap2 to traverse the data.
Step 3. Extract Pmap3 from data. Pmap3 represents the presence map for repeating group2 followed by the New Bid1 fields.
• By the time the decoding process reaches Pmap3, prior values have been established for several fields based on the content of the prior repeating group.
• The decoding process uses the prior values in combination with the encoded data to generate the proper decoded values.
Step 4. Extract Pmap4 from data. Pmap4 is the final presence map and the decoder recognizes that all bits are set to off indicating that either prior values should be used or that fields do not use a bit.
The following diagram illustrates the decoding process flow:
Bit unused = no Pmap bit required for delta or constant values