[This message was posted by Naresh Maharaj of Instinet Europe plc 
<[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/bbf268fc - PLEASE DO NOT REPLY BY MAIL.]

I have a pmap at the beginning of the segment

01 B6 F7 
01 B6 is the block length stop bit encoded The size is 182


Next stop bit entity is F7 Pmap byte hex 0xF7 When encoded = 1110111
This give me 7 bits 

The first pmap bit is used for the implicit copy operator for the
template identifier (TID). This is specified in section 10 Transfer
Encoding, in the paragraph defining 'segment'. 

This leaves 110111

These bits are then used as below:

        [string name="BeginString" id="8"] [constant value="FIXT.1.1"/] 
[/string]
        [string name="MessageType" id="35"] [constant value="X"/] [/string]
        [string name="ApplVerID" id="1128"] [constant value="7"/] [/string] 
[!-- 7: FIX50 --]
1       [string name="SenderCompID" id="49"] [copy/] [/string]
        [string name="TargetCompID" id="56"] [constant value="SWXGROUP-MDC"/] 
[/string] [!-- Market Data Consumer --]
1       [uInt32 name="MsgSeqNum" id="34"] [increment/] [/uInt32]
1       [string name="PossResend" id="97"][copy value="N"/][/string] [!-- N: 
Original Transmission --]
0       [string name="SendingTime" id="52"] [tail/] [/string] 
1       [uInt32 name="MDBookType" id="1021"][copy/][/uInt32]
1       [sequence name="MDEntries"]

No more pmap bits used.

We then enter the sequence of fields that have there own sequence pmap bits.
All works fine and all the messages are received in good order every byte 
checked and accounted for.

Here is the output.

---1st message in 1 single block----

8=FIXT.1.1,35=X,1128=7,49=SWXGROUP-MDI.P01,56=SWXGROUP-MDC,34=1290985,97=N,52=20090929-12:31:06.631,1021=2,268=4

 
 
,279=2,269=0,48=CH0047533572,22=4,273=12:31:06.616,336=EBRk,1023=3,83=33358
  
,279=0,269=0,48=CH0047533572,22=4,270=1595.44,271=100,273=12:31:06.616,336=EBRk,346=0,6566=1,1023=3,83=33359
  ,279=2,269=1,48=CH0047533572,22=4,273=12:31:06.616,336=EBRk,1023=2,83=33360
  
,279=0,269=1,48=CH0047533572,22=4,270=1610.44,271=100,273=12:31:06.616,336=EBRk,346=0,6566=1,1023=2,83=33361,


Now there is more bytes left in the stream staring with 

81 85 7E A8 ....

What I noticed was that there was no header pmap bits to re-create the header 
again as above. 
It also seems correct that the 81 85 both refer to 

[uInt32 name="MDBookType" id="1021"][copy/][/uInt32]

[sequence name="MDEntries"] (note 268=5)

I know this is correct as the next output is:

---2nd message in 1 single block----

8=FIXT.1.1,35=X,1128=7,49=SWXGROUP-MDI.P01,56=SWXGROUP-MDC,34=1290986,97=N,52=20090929-12:31:06.631,1021=2,268=5

 
 
,279=2,269=0,48=CH0029792717,22=4,273=12:31:06.621,336=EBRk,1023=2,83=121943
  
,279=1,269=0,48=CH0029792717,22=4,271=106,273=12:31:06.621,336=EBRk,6566=1,1023=1,83=121944
  
,279=0,269=0,48=CH0029792717,22=4,270=1567,271=10,273=12:31:06.621,336=EBRk,346=1,6566=0,1023=5,83=121945
  ,279=2,269=1,48=CH0029792717,22=4,273=12:31:06.621,336=EBRk,1023=2,83=121946
  
,279=0,269=1,48=CH0029792717,22=4,270=1598,271=100,273=12:31:06.621,336=EBRk,346=0,6566=1,1023=2,83=121947,



So the problem is that I can't recreate the header as I have no 2nd lot of 6 
pmap bits for the 2nd message
4 for the header, 1 for the MDBookType and 1 for the number of entries in the 
sequence.










> Thanks David.
> 
> The only issue I have now is getting the pmap bits to correspond
> directly to the operators in the template and the incoming message
> 
> See my illustration below with this message:
> 
> 00 D4 F7 01 C8 53 57 58 47 52 4F 55 50 2D 4D 44 .....SWXGROUP-MD 49 2E
> 50 30 B1 03 09 57 BE 32 30 30 39 30 39 32 I.P0...W.2009092 35 2D 31 30
> 3A 32 31 3A 35 30 2E 35 31 B7 81 81 5-10:21:50.51... 57 B8 B1 43 48 30
> 30 33 31 30 31 34 38 37 B8 A1 W..CH003101487.. 80 31 30 3A 32 31 3A 35
> 30 2E 34 39 B3 44 45 D3 .10:21:50.49.DE. 80 80 80 80 01 BC ......
> 
> 00 D4 is the block length stop bit encoded The size is 84
> 
> Next stop bit entity is F7 Pmap byte hex 0xF7 When encoded = 1110111
> 
> This give me 7 bits
> 
> 
>         [string name="BeginString" id="8"] [constant value="FIXT.1.1"/]
>         [/string] [string name="MessageType" id="35"] [constant
>         value="X"/] [/string] [string name="ApplVerID" id="1128"]
>         [constant value="7"/] [/string] [!-- 7: FIX50 --] 1 [string
>         name="SenderCompID" id="49"] [copy/] [/string] [string
>         name="TargetCompID" id="56"] [constant value="SWXGROUP-MDC"/]
>         [/string] [!-- Market Data Consumer --] 1 [uInt32
>         name="MsgSeqNum" id="34"] [increment/] [/uInt32] 1 [string
>         name="PossResend" id="97"][copy value="N"/][/string] [!-- N:
>         Original Transmission --] [string name="SendingTime" id="52"]
>         [tail/] [/string]
> 
> 
> I have put the pmap bits on the left above.
> 
> I know that the PossResend is not in the feed and the pmap value for
> PossResend should be 0. I can't get the pmap bits to correspond to the
> entities. From the spec I can determine that the pmap bits would not
> apply to a mandatory constant.
> 
> 
> 
> 
> > 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to