MANUALLY COMPUTING BYTES FOR TAG 9

Imported from previous forum

Hello,

Does anyone know how to manually compute the number of bytes in a message for TAG 9. Or of any tool that is available on the internet that might help with this operation.

Thanks In Advance

Tolly

[ original email was from Dean Kauffman - dean.kauffman@tradeweb.com ]
From the 4.4 spec - unchanged from earlier versions:

“The message length is indicated in the BodyLength field and is verified by counting the number of characters in the message following the BodyLength field up to, and including, the delimiter immediately preceding the CheckSum tag (“10=”).”

For example you want to send Logon. Without fields 8, 9, and 10 this is a 70-byte string:

35=A^49=SENDCOMPID^56=RCVCOMPID^34=1^52=20060915-16:00:01^98=0^108=60^

Before sending you prefix this with fields 8 and 9 giving a body length of 70 then generate field 10 based on the whole message content not including field 10 itself:

8=FIX.4.2^9=70^35=A^49=SENDCOMPID^56=RCVCOMPID^34=1^52=20060915-16:00:01^98=0^108=60^10=123^

Conversly when receiving, you shold wait for at least 20 bytes, parse field 8 and the body length from field 9, then wait for the calculated number of bytes in the message to arrive before processing: actual-length-of-8 plus actual-length-of-9 plus body-length-from-field-9 plus 7 [the fixed length of field 10].

Hello,

Does anyone know how to manually compute the number of bytes in a
message for TAG 9. Or of any tool that is available on the internet that
might help with this operation.

Thanks In Advance

Tolly

Thanks Dean.

So basically each character following the Bodylength field up to and including the delimeter preceding tag 10 is equal to one byte. And the sum of these bytes is the number we use for tag 9.

Appreciate the clarification.

From the 4.4 spec - unchanged from earlier versions:

“The message length is indicated in the BodyLength field and is verified
by counting the number of characters in the message following the
BodyLength field up to, and including, the delimiter immediately
preceding the CheckSum tag (“10=”).”

For example you want to send Logon. Without fields 8, 9, and 10 this is
a 70-byte string:

35=A^49=SENDCOMPID^56=RCVCOMPID^34=1^52=20060915-16:00:01^98=0^108=60^

Before sending you prefix this with fields 8 and 9 giving a body length
of 70 then generate field 10 based on the whole message content not
including field 10 itself:

8=FIX.4.2^9=70^35=A^49=SENDCOMPID^56=RCVCOMPID^34=1^52=20060915-
16:00:01^98=0^108=60^10=123^

Conversly when receiving, you shold wait for at least 20 bytes, parse
field 8 and the body length from field 9, then wait for the calculated
number of bytes in the message to arrive before processing: actual-length-of-
8 plus actual-length-of-9 plus body-length-from-field-9 plus 7 [the
fixed length of field 10].

Hello,

Does anyone know how to manually compute the number of bytes in a
message for TAG 9. Or of any tool that is available on the internet
that might help with this operation.

Thanks In Advance

Tolly