[This message was posted by Dale Wilson of Object Computing, Inc 
<[email protected]> to the "FAST Protocol" discussion forum at 
http://fixprotocol.org/discuss/46. You can reply to it on-line at 
http://fixprotocol.org/discuss/read/09132dc9 - PLEASE DO NOT REPLY BY MAIL.]

> According to spec ~ "6.2.2 Decimal Field Instructions: If the decimal
> field has optional presence and has INDIVIDUAL OPERATORS, the presence
> of the mantissa is dependent on the presence of the exponent." and
> "10.5.1 Presence Map and NULL Utilization: Decimal fields with
> individual operators have the following utilization: • If the decimal
> has mandatory presence, the exponent and mantissa fields are treated as
> two separate mandatory integer fields as described above. • If the
> decimal has optional presence, the exponent field is treated as an
> optional integer field and the mantissa field is treated as a mandatory
> integer field. The presence of the mantissa field and any related bits
> in the presence map are dependent on the presence of the exponent. The
> mantissa field appears in the stream iff the exponent value is
> considered present. If the mantissa has an operator that requires a bit
> in the presence map, this bit is present iff the exponent value is
> considered present."
> 
> I am some what clear with "Decimal fields with individual operators"

All of the above does not apply to your example because you do not have 
individual examples.


> 
> According to my given example:
> 
> (decimal id="1" presence="optional" name="Price") (copy/) (/decimal)
> 
> I have a single field operator for decimal field instruction.

In this case the PMAP bit and the presence attribute are used to decode the 
exponent.   If it turns out the exponent exists and is not null, the the 
mantissa is mandatory and not nullable.

I can't find a place in the standard where this is made explicit, but it is 
inherent in the description of decimal numbers.  

Section 10.5.1 may help:
The default, copy, and increment operators have the following presence map and 
NULL utilization:
• Mandatory integer, decimal, string and byte vector fields – one bit. If set, 
the value appears in the stream.
• Optional integer, decimal, string and byte vector fields – one bit. If set, 
the value appears in the stream in a nullable representation. A NULL indicates 
that the value is absent and the state of the previous value is set to empty, 
except when the default operator is used in which case the state of the 
previous value is left unchanged.

Decimal in this case refers to a decimal without individual operators for 
exponent and mantissa.

> 
> For "Decimal field with single field operator", my understanding is:
> 1. Both Exponent and mantissa will be treated as "optional" field.
>    (Am I right? 

No, the mantissa "inherits" it's presence from the exponent.  


Or always Mantissa will be treated as Mandatory.
>    According to spec, mantissa field is treated as a mandatory
>    integer field, if Decimal is having individual operators and
>    presence of decimal is optional)

For your example, we do NOT have individual operators.

> 
> 2. The presence of the mantissa does not depend on the presence of the
> exponent. (As there is no individual field operator). Am I right here?
> 
Yes.


> So, in case of "Decimal with single field operator",
> 
> Sequence 1: (Sender want to send 9427.55) PMAP Bit will be '1' Encoded
> value will be in form of exponent and mantissa: Sender will send
> Exponent as "-2" and Mantissa as "942755". Receiver will expect two
> fields (Exponent and Mantissa) in FAST Format. 

OK

Here presence of Mantissa
> does not depend on presence of exponent (as single field operator) 

Yes it does.   If the Exponent is present, the mantissa will be too, if the 
exponent is not present the mantissa will not be.

Wire
> representation for complete decimal field will be: 0xFE 0x39 0x45 0xA3
> 
> Sequence 2: (Sender want to send NULL) PMAP Bit will be '1' The combined
> decoded decimal value should be "NULL". 

Yes.

Here presence of Mantissa does
> not depend on presence of exponent (as single field operator) Receiver
> will expect two fields (Exponent and Mantissa) in FAST Format.

No.  Once the receiver sees the null Exponent it knows that the Mantissa field 
will not appear.


 whether
> Sender will send only one NULL (0x80) for exponent; or two NULL (0x80
> 0x80) for exponent and mantissa???

One NULL indicates the entire Decimal field is NULL (because the field does not 
have individual operators.)

Hope this helps,

Dale


[You can unsubscribe from this discussion group by sending a message to 
mailto:[email protected]]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Financial Information eXchange" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/fix-protocol?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to