[This message was posted by David Rosenborg of Pantor Engineering AB <[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/1a3f3c98 - PLEASE DO NOT REPLY BY MAIL.]
Naresh - The use of pbits is specified in section 10.5.1 Presence Map and NULL Utilization, in the FAST specification. For the copy operator, the corresponding bit in the pmap indicates whether the value is present in the stream or if it should be the same as the previous occurence of the field. If the bit is 1, then the value is in the stream, if it is 0, then it isn't and the previous value should be used. The value specified in the value attribute on the operator is called the initial value. The initial value is only used for the very first instance of the field and only if the corresponding bit is 0 at the same time. The fact that a field is optional isn't related to the use of bits in the pmap. An absent optional field is indicated by the special value NULL in the stream. /David > Please can you help with this query. > > If I can get this resolved then it will further help in the logic and > scope of using the presence map. > > I have a template as below: > > [Please read “less than char“ as “(” and “greater than char” as “)”] > > "(template name="StandardHeaderPart2") (string name="ApplVerID" > id="1128") (constant value="7"/) (/string) (string name="SenderCompID" > id="49") (copy/) (/string) (string name="TargetCompID" id="56") > (constant value="SWXGROUP-MDC"/) (/string) (uInt32 name="MsgSeqNum" > id="34") (increment/) (/uInt32) (string name="PossResend" id="97")(copy > value="N"/)(/string) (string name="SendingTime" id="52") (tail/) > (/string) (/template)" > > > And here is the data output that I see from the stream as I process > the message. > > [OUTPUT] SenderCompID:SWXGROUP-MDI.P01| MsgSeqNum:1290984| > PossResend:20090929- > 12:31:06.532| SendingTime > > > Note the PossResend was not in the stream so the next entity read > inadvertently was the Sendtime and this was added the field PossResend. > This happened because there was no way to determine if the PossResend > value was in the stream or not. > > If indicated then I would have read the next data entity as the field > SendingTime instead. > > I refer to the template above and the line: (string name="PossResend" > id="97")(copy value="N"/)(/string) > > The FAST Spec confirms the copy operator value of a field can be > optional and may or may not be in the stream. So I intepret this as :- > "if not in the stream add 'N' as part of your message construction". > "else if present in the stream use and copy the value". > > The question is :- How do I determine if present in the stream? > > Do I use the presence map in the messsage to determine if the PossResend > is in the stream? Or is the Presence map bits reserved only for fields > that have the optional tag? > > e.g. below: > > (string name="MDExecTime" id="6572" presence="optional") (tail/) > > > > Regards > > > Naresh [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 -~----------~----~----~----~------~----~------~--~---
