Imported from previous forum
I try to encode a message and it keep give the error. The problem is came from “constant” in side of a “sequence”. (146 is sequence length, 55 and 8 are constant in side of sequence)
“Error occurred on line #1: Parsed 3 groups in sequence when 1 were expected. [line: 1128=8 35=R 49=CME 34=3 146=1 55=[N/A] 38=100 22=8]: Parsed 3 groups in sequence when 1 were expected.”
Message give error:
1128=835=R49=CME34=3146=155=[N/A]38=10022=8
Message ok:
1128=835=R49=CME34=3146=138=100
Douglas,
Could you provide some more context?
Best,
Rolf
I try to encode a message and it keep give the error. The problem is
came from “constant” in side of a “sequence”. (146 is sequence length,
55 and 8 are constant in side of sequence)“Error occurred on line #1: Parsed 3 groups in sequence when 1 were
expected. [line: 1128=8 35=R 49=CME 34=3 146=1 55=[N/A] 38=100 22=8]:
Parsed 3 groups in sequence when 1 were expected.”Message give error: 1128=835=R49=CME34=3146=155=[N/A]38=10022=8
Message ok: 1128=835=R49=CME34=3146=138=100
Test 1 ok:
1128=835=R49=CME34=3146=138=100
Test2 error:
1128=835=R49=CME34=3146=155=[N/A]38=10022=8
Template: (Replate () with <>)
(template name=“QuoteRequest” id=“47” dictionary=“47” xmlns=“http://www.fixprotocol.org/ns/fast/td/1.1”)
(string name=“ApplVerID” id=“1128”)
(constant value=“8” /)
(/string)
(string name=“MessageType” id=“35”)
(constant value=“R” /)
(/string)
(string name=“SenderCompID” id=“49”)
(constant value=“CME” /)
(/string)
(uInt32 name=“MsgSeqNum” id=“34” /)
(sequence name=“RelatedSym”)
(length name=“NoRelatedSym” id=“146” /)
(string name=“Symbol” id=“55”)
(constant value=“[N/A]” /)
(/string)
(uInt64 name=“OrderQty” id=“38” presence=“optional” /)
(uInt32 name=“SecurityIDSource” id=“22”)
(constant value=“8” /)
(/uInt32)
(/sequence)
(/template)
Douglas,
Could you provide some more context?
Best, Rolf
I try to encode a message and it keep give the error. The problem is
came from “constant” in side of a “sequence”. (146 is sequence length,
55 and 8 are constant in side of sequence)“Error occurred on line #1: Parsed 3 groups in sequence when 1 were
expected. [line: 1128=8 35=R 49=CME 34=3 146=1 55=[N/A] 38=100 22=8]:
Parsed 3 groups in sequence when 1 were expected.”Message give error:
1128=835=R49=CME34=3146=155=[N/A]38=10022=8Message ok: 1128=835=R49=CME34=3146=138=100
Douglas,
your posts don’t make sense.
Who wrote the encoder? You should probably be talking to them.
/Rolf
Test 1 ok: 1128=8|35=R|49=CME|34=3|146=1|38=100|
Test2 error: 1128=8|35=R|49=CME|34=3|146=1|55=[N/A]|38=100|22=8|
I was test a sample template using.
http://fast.fixprotocol.org/templates.html
If you upload my template and this two message. You can see the error.
Douglas,
your posts don’t make sense. Who wrote the encoder? You should probably
be talking to them./Rolf
Test 1 ok: 1128=8|35=R|49=CME|34=3|146=1|38=100|
Test2 error: 1128=8|35=R|49=CME|34=3|146=1|55=[N/A]|38=100|22=8|
Ah, sorry, I didn’t realize you where using the test site.
Jake will help you out.
/Rolf
I was test a sample template using.
http://fast.fixprotocol.org/templates.html
If you upload my template and this two message. You can see the error.
Why would you send field values in a message if the template defines them as constant? The FAST 1.1 spec says “The value of a constant field is never transferred.”. Sending it implies that values might be different from the template and even different across messages. This is inconsistent with the definition of the constant operator.
I try to encode a message and it keep give the error. The problem is
came from “constant” in side of a “sequence”. (146 is sequence length,
55 and 8 are constant in side of sequence)“Error occurred on line #1: Parsed 3 groups in sequence when 1 were
expected. [line: 1128=8 35=R 49=CME 34=3 146=1 55=[N/A] 38=100 22=8]:
Parsed 3 groups in sequence when 1 were expected.”Message give error: 1128=835=R49=CME34=3146=155=[N/A]38=10022=8
Message ok: 1128=835=R49=CME34=3146=138=100
If a constant is outside of “sequence” it will allow you to send this is not inconsistent. Plus at time when creating the data message you don’t know which field is constant.
There is the templage I using: ( I have to replace <> with () this forums does not take XML)
Message give error:
1128=835=R49=CME34=3146=155=[N/A]38=10022=8
Note: 55 and 22 are constant inside of sequence.
Message ok:
1128=835=R49=CME34=3146=138=100
Note: Field 35 and 49 are constant out side of sequence.
(template name=“QuoteRequest” id=“47” dictionary=“47” xmlns=“http://www.fixprotocol.org/ns/fast/td/1.1”)
(string name=“ApplVerID” id=“1128”)
(constant value=“8” /)
(/string)
(string name=“MessageType” id=“35”)
(constant value=“R” /)
(/string)
(string name=“SenderCompID” id=“49”)
(constant value=“CME” /)
(/string)
(uInt32 name=“MsgSeqNum” id=“34” /)
(sequence name=“RelatedSym”)
(length name=“NoRelatedSym” id=“146” /)
(string name=“Symbol” id=“55”)
(constant value=“[N/A]” /)
(/string)
(uInt64 name=“OrderQty” id=“38” presence=“optional” /)
(uInt32 name=“SecurityIDSource” id=“22”)
(constant value=“8” /)
(/uInt32)
(/sequence)
(/template)
Why would you send field values in a message if the template defines
them as constant? The FAST 1.1 spec says “The value of a constant field
is never transferred.”. Sending it implies that values might be
different from the template and even different across messages. This is
inconsistent with the definition of the constant operator.I try to encode a message and it keep give the error. The problem is
came from “constant” in side of a “sequence”. (146 is sequence length,
55 and 8 are constant in side of sequence)“Error occurred on line #1: Parsed 3 groups in sequence when 1 were
expected. [line: 1128=8 35=R 49=CME 34=3 146=1 55=[N/A] 38=100 22=8]:
Parsed 3 groups in sequence when 1 were expected.”Message give error:
1128=835=R49=CME34=3146=155=[N/A]38=10022=8Message ok: 1128=835=R49=CME34=3146=138=100
I do not understand, as I assume to only use a constant operator when I know upfront that there will never be a different value. I would use the “default” operator if I mostly have one value but sometimes a different value. I can probably send the default value on the wire even if it is identical to the value in the template. I was unaware that this applies to the “constant” operator under certain circumstances.
Can you please point me to the FAST spec where it defines that constants can be sent (outside of a sequence)? Does that mean it is not allowed inside of a sequence? You say that your problem comes from sending constants for 55 and 22 inside of a sequence.
Thanks.
If a constant is outside of “sequence” it will allow you to send this is
not inconsistent. Plus at time when creating the data message you don’t
know which field is constant.There is the templage I using: ( I have to replace <> with () this
forums does not take XML)Message give error: 1128=835=R49=CME34=3146=155=[N/A]38=10022=8
Note: 55 and 22 are constant inside of sequence.Message ok: 1128=835=R49=CME34=3146=138=100
Note: Field 35 and 49 are constant out side of sequence.
I was doing a test at
http://fast.fixprotocol.org/templates.html
I do not understand, as I assume to only use a constant operator when I
know upfront that there will never be a different value. I would use the
“default” operator if I mostly have one value but sometimes a different
value. I can probably send the default value on the wire even if it is
identical to the value in the template. I was unaware that this applies
to the “constant” operator under certain circumstances.Can you please point me to the FAST spec where it defines that constants
can be sent (outside of a sequence)? Does that mean it is not allowed
inside of a sequence? You say that your problem comes from sending
constants for 55 and 22 inside of a sequence.Thanks.
If a constant is outside of “sequence” it will allow you to send this
is not inconsistent. Plus at time when creating the data message you
don’t know which field is constant.There is the templage I using: ( I have to replace <> with () this
forums does not take XML)Message give error:
1128=835=R49=CME34=3146=155=[N/A]38=10022=8
Note: 55 and 22 are constant inside of sequence.Message ok: 1128=835=R49=CME34=3146=138=100
Note: Field 35 and 49 are constant out side of sequence.
Hi Douglas,
This looks like a bug in the FIX over FAST encoding used by the FAST Interoperability Portal. I will investigate the issue and let you know when it has been fixed. If you have any other issues, feel free to contact me directly.
Thanks,
Jake
I was doing a test at http://fast.fixprotocol.org/templates.html
I do not understand, as I assume to only use a constant operator when
I know upfront that there will never be a different value. I would use
the “default” operator if I mostly have one value but sometimes a
different value. I can probably send the default value on the wire
even if it is identical to the value in the template. I was unaware
that this applies to the “constant” operator under certain
circumstances.Can you please point me to the FAST spec where it defines that
constants can be sent (outside of a sequence)? Does that mean it is
not allowed inside of a sequence? You say that your problem comes from
sending constants for 55 and 22 inside of a sequence.Thanks.
If a constant is outside of “sequence” it will allow you to send
this is not inconsistent. Plus at time when creating the data
message you don’t know which field is constant.There is the templage I using: ( I have to replace <> with () this
forums does not take XML)Message give error:
1128=835=R49=CME34=3146=155=[N/A]38=10022=8
Note: 55 and 22 are constant inside of sequence.Message ok: 1128=835=R49=CME34=3146=138=100
Note: Field 35 and 49 are constant out side of sequence.